Closed keon-dev closed 1 month ago
Perform lexical analysis to turn plain text source code into tokens
The lexer will receive input that looks like:
"let x = 5 + 5;"
And what comes out looks something like:
[ LET, IDENTIFIER("x"), EQUAL_SIGN, INTEGER(5), PLUS_SIGN, INTEGER(5), SEMICOLON ]
Initial lexer should be able to parse the following snippet:
let five = 5; let ten = 10; let add = fn(x, y) { x + y; }; let result = add(five, ten);
The following must be implemented to evaluate the above code:
let
fn
Perform lexical analysis to turn plain text source code into tokens
The lexer will receive input that looks like:
And what comes out looks something like:
Initial lexer should be able to parse the following snippet:
The following must be implemented to evaluate the above code:
let
orfn