We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f512180 commit 096a321Copy full SHA for 096a321
2 files changed
parser.go
@@ -89,7 +89,7 @@ func (p *parser) parseFactor() *Factor {
89
90
func (p *parser) parseTerm() *Term {
91
fs := []*Factor{p.parseFactor()}
92
- for tokenInvalid < p.token && p.token < tokenPipe {
+ for tokenEnd < p.token && p.token < tokenPipe {
93
fs = append(fs, p.parseFactor())
94
}
95
return &Term{Factors: fs}
tokens.go
@@ -6,6 +6,7 @@ type token int
6
7
const (
8
tokenInvalid token = iota
9
+ tokenEnd
10
tokenIdentifier
11
tokenLiteral
12
tokenLeftParen
@@ -17,7 +18,6 @@ const (
17
18
tokenRightBracket
19
tokenRightBrace
20
tokenPeriod
- tokenEnd
21
)
22
23
func tokenString(t token, text string) string {
0 commit comments