()
| 714 | } |
| 715 | |
| 716 | func (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". |
nothing calls this directly
no test coverage detected