aboutsummaryrefslogtreecommitdiff
path: root/driver/lexer.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-04-17 22:51:06 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-04-17 22:51:06 +0900
commit88f83624dc6d7c3b66a34c7c3f414719530e421f (patch)
tree31c0d8c966a4eaf98dd1670855298a8b4e0969c2 /driver/lexer.go
parentChange the lexical specs of regexp and define concrete syntax error values (diff)
downloadtre-88f83624dc6d7c3b66a34c7c3f414719530e421f.tar.gz
tre-88f83624dc6d7c3b66a34c7c3f414719530e421f.tar.xz
Add validation of lexical specs and improve error messages
Diffstat (limited to 'driver/lexer.go')
-rw-r--r--driver/lexer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/lexer.go b/driver/lexer.go
index 4a3c3cc..356b168 100644
--- a/driver/lexer.go
+++ b/driver/lexer.go
@@ -245,7 +245,7 @@ func (l *lexer) next() (*Token, error) {
state = nextState
id, ok := l.clspec.DFA.AcceptingStates[state]
if ok {
- tok = newToken(id, l.clspec.Kinds[id], newByteSequence(buf))
+ tok = newToken(id, l.clspec.Kinds[id].String(), newByteSequence(buf))
unfixedBufLen = 0
}
}