()
| 753 | } |
| 754 | |
| 755 | func (parser *Parser) getExpressionLeftSideValue() (token.Token, bool, error) { |
| 756 | var leftSide token.Token |
| 757 | isAnonymitifier := false |
| 758 | startedWithApostrophe := parser.skipIfCurrentTokenIsApostrophe() |
| 759 | |
| 760 | if startedWithApostrophe { |
| 761 | isAnonymitifier = true |
| 762 | value := "" |
| 763 | for parser.currentToken.Type != token.EOF && parser.currentToken.Type != token.APOSTROPHE { |
| 764 | value += parser.currentToken.Literal |
| 765 | parser.nextToken() |
| 766 | } |
| 767 | |
| 768 | leftSide = token.Token{Type: token.IDENT, Literal: value} |
| 769 | |
| 770 | finishedWithApostrophe := parser.skipIfCurrentTokenIsApostrophe() |
| 771 | |
| 772 | err := validateApostropheWrapping(startedWithApostrophe, finishedWithApostrophe, leftSide) |
| 773 | |
| 774 | if err != nil { |
| 775 | return token.Token{}, isAnonymitifier, err |
| 776 | } |
| 777 | } else { |
| 778 | leftSide = parser.currentToken |
| 779 | parser.nextToken() |
| 780 | } |
| 781 | return leftSide, isAnonymitifier, nil |
| 782 | } |
| 783 | |
| 784 | // getOperationExpression - Return ast.OperationExpression created from tokens and validate the syntax |
| 785 | func (parser *Parser) getOperationExpression(expression ast.Expression) (bool, *ast.OperationExpression, error) { |
no test coverage detected