Commit graph

21 commits

Author SHA1 Message Date
59acf6b1a1 Implement strings and partial implementation of arrays (missing index expr eval)
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-10 17:48:54 -08:00
a76f47a7a3 Evaluate function literals and function calls.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-09 16:33:19 -08:00
500a058ff8 Add variable bindings and references to the evaluator.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-08 19:41:36 -08:00
8514ead895 Evaluate if and return, error validation.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-07 18:15:12 -08:00
cf8b0033c9 Introduced the evaluator (and integrated it with the REPL)
It supports integer and boolean literals, prefix expressions and infix
expressions with integer operands.

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-06 18:24:23 -08:00
acc6707740 Add error message to the REPL
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-06 16:36:24 -08:00
44f936affb Parse call expressions and gets rid of the TODOs in parse let and return.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-05 16:59:06 -08:00
985cf24fbc Parse function literals.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-05 16:13:08 -08:00
9e9324bb56 Parse if and if else expressions.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-05 15:35:00 -08:00
5367fbd29d Move AST nodes to their own files.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-05 13:05:35 -08:00
4acc09faf9 Parsed grouped expressions (that was easy!).
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-05 11:37:13 -08:00
c417e90f36 Parsing and testing boolean literals.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-04 19:16:22 -08:00
5fa7b2481a Parses infix expressions.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-04 17:56:10 -08:00
f286a88039 Parsing identifiers, integer literals and prefix expressions (all as expression statements)
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-03 19:38:03 -08:00
577fad2da6 Parsing statements (skipping expressions).
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-02 19:46:45 -08:00
04dfd62600 Add REPL boilerplate.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-02 17:18:00 -08:00
dcf5cb336a Done with lexer (chap1)
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-01 18:35:22 -08:00
f8099f50d2 Initialize go module
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-01 15:53:05 -08:00
4d2b0652da Add a development flake.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-01 15:48:44 -08:00
9aa807b9c2 Download and add the "code" folder.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-01 15:44:44 -08:00
4d018b4ceb Initial commit 2025-01-01 15:41:58 -08:00