Skip to content

Commit

Permalink
feat: array token to lexer test
Browse files Browse the repository at this point in the history
  • Loading branch information
yazaldefilimone committed Feb 25, 2024
1 parent c9be672 commit 6f28465
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lexer/lexer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe("Lexer", () => {
10 != 9;
"foobar"
"foo bar"
[10, "hello"]
`;
const tests = [
new Token(TokenType.LET, "let"),
Expand Down Expand Up @@ -99,6 +100,11 @@ describe("Lexer", () => {
new Token(TokenType.SEMICOLON, ";"),
new Token(TokenType.STRING, "foobar"),
new Token(TokenType.STRING, "foo bar"),
new Token(TokenType.LBRACKET, "["),
new Token(TokenType.INT, "10"),
new Token(TokenType.COMMA, ","),
new Token(TokenType.STRING, "hello"),
new Token(TokenType.RBRACKET, "]"),
new Token(TokenType.EOF, ""),
];

Expand Down

0 comments on commit 6f28465

Please sign in to comment.