MCPcopy Create free account
hub / github.com/Permify/permify / parseIdentifierOrCall

Method parseIdentifierOrCall

pkg/dsl/parser/parser.go:716–727  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

714}
715
716func (p *Parser) parseIdentifierOrCall() (ast.Expression, error) {
717 // Ensure the current token is a valid identifier before proceeding.
718 if !p.currentTokenIs(token.IDENT) {
719 return nil, fmt.Errorf("unexpected token type for identifier expression: %s", p.currentToken.Type)
720 }
721
722 if p.peekTokenIs(token.LP) {
723 return p.parseCallExpression()
724 }
725
726 return p.parseIdentifierExpression()
727}
728
729// parseIdentifier parses an identifier expression that may consist of one or more dot-separated
730// identifiers, such as "x", "foo.bar", or "a.b.c.d".

Callers

nothing calls this directly

Calls 4

currentTokenIsMethod · 0.95
peekTokenIsMethod · 0.95
parseCallExpressionMethod · 0.95

Tested by

no test coverage detected