Skip to content

Commit

Permalink
test: lexer.test.ts to include additional integers in an array
Browse files Browse the repository at this point in the history
  • Loading branch information
yazaldefilimone committed Feb 25, 2024
1 parent 2148de9 commit 1fca3c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lexer/lexer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("Lexer", () => {
10 != 9;
"foobar"
"foo bar"
[10, "hello"]
[10, 1+3, "hello"]
`;
const tests = [
new Token(TokenType.LET, "let"),
Expand Down Expand Up @@ -103,6 +103,10 @@ describe("Lexer", () => {
new Token(TokenType.LBRACKET, "["),
new Token(TokenType.INT, "10"),
new Token(TokenType.COMMA, ","),
new Token(TokenType.INT, "1"),
new Token(TokenType.PLUS, "+"),
new Token(TokenType.INT, "3"),
new Token(TokenType.COMMA, ","),
new Token(TokenType.STRING, "hello"),
new Token(TokenType.RBRACKET, "]"),
new Token(TokenType.EOF, ""),
Expand Down

0 comments on commit 1fca3c4

Please sign in to comment.