aboutsummaryrefslogtreecommitdiff
path: root/spec/lexer_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-08-22 19:15:03 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-08-22 19:15:03 +0900
commit02674d7264aea363a8f7b7839ab77ce64ba720db (patch)
treea849d566004b7d1e711fa4c667a54a5eab322c78 /spec/lexer_test.go
parentSupport %left and %right to specify precedences and associativities (diff)
downloadurubu-02674d7264aea363a8f7b7839ab77ce64ba720db.tar.gz
urubu-02674d7264aea363a8f7b7839ab77ce64ba720db.tar.xz
Add a column number to an error message
Diffstat (limited to 'spec/lexer_test.go')
-rw-r--r--spec/lexer_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lexer_test.go b/spec/lexer_test.go
index e5d999e..51e5f59 100644
--- a/spec/lexer_test.go
+++ b/spec/lexer_test.go
@@ -9,23 +9,23 @@ import (
func TestLexer_Run(t *testing.T) {
idTok := func(text string) *token {
- return newIDToken(text, newPosition(1))
+ return newIDToken(text, newPosition(1, 0))
}
termPatTok := func(text string) *token {
- return newTerminalPatternToken(text, newPosition(1))
+ return newTerminalPatternToken(text, newPosition(1, 0))
}
symTok := func(kind tokenKind) *token {
- return newSymbolToken(kind, newPosition(1))
+ return newSymbolToken(kind, newPosition(1, 0))
}
posTok := func(num int) *token {
- return newPositionToken(num, newPosition(1))
+ return newPositionToken(num, newPosition(1, 0))
}
invalidTok := func(text string) *token {
- return newInvalidToken(text, newPosition(1))
+ return newInvalidToken(text, newPosition(1, 0))
}
tests := []struct {