Skip to content

Commit 096a321

Browse files
committed
Move tokenEnd after tokenInvalid
1 parent f512180 commit 096a321

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (p *parser) parseFactor() *Factor {
8989

9090
func (p *parser) parseTerm() *Term {
9191
fs := []*Factor{p.parseFactor()}
92-
for tokenInvalid < p.token && p.token < tokenPipe {
92+
for tokenEnd < p.token && p.token < tokenPipe {
9393
fs = append(fs, p.parseFactor())
9494
}
9595
return &Term{Factors: fs}

tokens.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type token int
66

77
const (
88
tokenInvalid token = iota
9+
tokenEnd
910
tokenIdentifier
1011
tokenLiteral
1112
tokenLeftParen
@@ -17,7 +18,6 @@ const (
1718
tokenRightBracket
1819
tokenRightBrace
1920
tokenPeriod
20-
tokenEnd
2121
)
2222

2323
func tokenString(t token, text string) string {

0 commit comments

Comments
 (0)