Fix strings lexing and add a few tests

This commit is contained in:
Thomas Pelletier
2013-03-26 10:53:49 +01:00
parent b1c54ee485
commit 8a5d380286
4 changed files with 93 additions and 31 deletions
+2
View File
@@ -162,6 +162,8 @@ func parseArray(p *parser) []interface{} {
panic("unterminated array")
}
if follow.typ != tokenRightBracket && follow.typ != tokenComma {
fmt.Println(follow.typ)
fmt.Println(follow.val)
panic("missing comma")
}
if follow.typ == tokenComma {