diff --git a/lexer/lexer_test.go b/lexer/lexer_test.go index a41e4b5..7531584 100644 --- a/lexer/lexer_test.go +++ b/lexer/lexer_test.go @@ -34,8 +34,8 @@ func TestLexer (test *testing.T) { testString(test, ` normalIdent TypeIdent -[$$abcdEfGhIjKlMnOpQrStUvWxYz]{+}(-) -~ ! @ # $ % ^ & *- _ = + \ | ; :** ::, < . > / ? +[$$abcdEfGhIjKlMnOpQrStUvWxYz]{+}(-) ; this is a comment +~ ! @ # $ % ^ & *- _ = + \ | :** ::, < . > / ? !! ++ -- && || 'some \'string' 'nullterm\0' '\110\117\115\105' 1234 -1234 9876540321 (754.2340) `, @@ -67,7 +67,6 @@ tok(Symbol, "="), tok(Symbol, "+"), tok(Symbol, "\\"), tok(Symbol, "|"), -tok(Symbol, ";"), tok(Colon, ":"), tok(Star, "*"), tok(Star, "*"), diff --git a/lexer/test-common.go b/lexer/test-common.go index fafe239..fda588b 100644 --- a/lexer/test-common.go +++ b/lexer/test-common.go @@ -74,14 +74,14 @@ func testStringErr ( } } - dumpToken := func (token lexer.Token) string { - return fmt.Sprintf("%4v: \"%s\"", token.Type, token.Value) - } - printColumns := func (left, right string) { test.Logf("%-40v | %-40v", left, right) } + dumpToken := func (token lexer.Token) string { + return fmt.Sprintf("%4v: \"%s\"", token.Type, token.Value) + } + compareTokens := func () { length := len(tokens) if len(correct) > length { length = len(correct) }