aboutsummaryrefslogtreecommitdiff
path: root/spec/lexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lexer.go')
-rw-r--r--spec/lexer.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/lexer.go b/spec/lexer.go
index 18aae51..a8e46ad 100644
--- a/spec/lexer.go
+++ b/spec/lexer.go
@@ -16,6 +16,7 @@ import (
type tokenKind string
const (
+ tokenKindKWFragment = tokenKind("fragment")
tokenKindID = tokenKind("id")
tokenKindTerminalPattern = tokenKind("terminal pattern")
tokenKindColon = tokenKind(":")
@@ -109,6 +110,8 @@ func (l *lexer) next() (*token, error) {
continue
case "line_comment":
continue
+ case "kw_fragment":
+ return newSymbolToken(tokenKindKWFragment), nil
case "identifier":
return newIDToken(tok.Text()), nil
case "terminal_open":