This commit is contained in:
Chuck Smith
2024-01-22 20:41:05 -05:00
parent 069b5ba8cf
commit 5536dbeaaa
10 changed files with 394 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ func TestNextToken(t *testing.T) {
"foobar"
"foo bar"
[1, 2];
{"foo": "bar"}
`
tests := []struct {
@@ -126,6 +127,12 @@ func TestNextToken(t *testing.T) {
{token.RBRACKET, "]"},
{token.SEMICOLON, ";"},
{token.LBRACE, "{"},
{token.STRING, "foo"},
{token.COLON, ":"},
{token.STRING, "bar"},
{token.RBRACE, "}"},
{token.EOF, ""},
}