ctsk
45014fbe77
[rlox] Add repl
2023-10-08 12:25:21 +02:00
ctsk
e7e7ef3b10
[rlox] Clean up
2023-10-08 11:20:00 +02:00
ctsk
8ce54fc17c
[rlox] Add first sprout of parser
2023-06-04 19:19:48 +02:00
ctsk
20cb2e90d2
[rlox] Move name out of Chunk
2023-06-03 13:45:31 +02:00
ctsk
6d9511e7f2
[rlox] Faactor out scanner tests
2023-04-19 10:22:49 +02:00
ctsk
02dd735ea6
[rlox] refactor
2023-04-14 15:27:24 +02:00
ctsk
50780273f2
[rlox] Implement Scanner
2023-04-14 14:37:39 +02:00
ctsk
5be9950d99
[rlox] mini-cleanup
2023-04-04 20:49:42 +02:00
ctsk
d227e3d3ba
[rlox] Implement basic arithmetic ops
2023-04-04 19:03:57 +02:00
ctsk
c0447cf7ab
[tlox] LoxException -> runtime.LoxException
2023-03-30 21:25:44 +02:00
ctsk
278bcf5a54
[rlox] Dedop tracing
2023-03-30 20:43:36 +02:00
ctsk
acc95c36e9
[rlox] Implement VM Stack
2023-03-30 11:49:38 +02:00
ctsk
73a3d93f82
[rlox] Add line information to chunk
2023-03-29 21:15:41 +02:00
ctsk
d6e6b1d3ab
[rlox] Use fewer files
2023-03-29 20:07:31 +02:00
ctsk
ff67071f5b
[rlox] init
2023-03-29 20:03:16 +02:00
ctsk
26cbca5c55
[jlox] conformance tests (wip)
2022-10-11 14:38:29 +02:00
ctsk
da00410738
Implement super
2022-10-11 13:18:40 +02:00
ctsk
f0b55491d8
[jlox] Interpret superclasses
2022-10-11 12:58:28 +02:00
ctsk
e68b3036f7
[jlox] Resolve superclasses
2022-10-11 12:12:32 +02:00
ctsk
6d20bb63c2
[jlox] Parse superclass
2022-10-11 12:07:44 +02:00
ctsk
5729dbc010
[jlox] Add get/set for instance fields
2022-10-10 20:44:31 +02:00
ctsk
f1eeff583c
[jlox] Classes
2022-09-17 22:17:52 +02:00
ctsk
a744ca18f9
Revert "[tlox] global vars"
...
This reverts commit c8f5edc494 .
2022-09-17 20:48:05 +02:00
ctsk
c8f5edc494
[tlox] global vars
2022-09-15 17:22:00 +02:00
ctsk
63d502d6f9
[tlox] Add 'Nil'
2022-09-15 10:03:06 +02:00
ctsk
94ffb5370b
[tlox] Add string and boolean literals
2022-09-14 22:55:19 +02:00
ctsk
b400c6b4ef
[jlox] Add Resolution and Binding
...
A very subtle bug: The resolution relies on the fact that Java has a
concept of object identity: Even when the "Contents" of two objects are
equal, those objects are not considered equal.
This does not hold for records:
```
record Test(int val) {}
var a = new Test(1);
var b = new Test(1);
var m = new HashMap<>();
m.put(a, "Hello");
m.get(b); // returns "Hello"
```
tl;dr - got bitten by trying to do things fancy
2022-09-14 20:45:54 +02:00
ctsk
a1e5b4cb79
[tlox] Add Equality and Unary operands
2022-09-13 20:51:33 +02:00
ctsk
ed8f945f7f
[tlox] Add support for comparisons
2022-09-13 19:05:17 +02:00
ctsk
a93b1018ca
[tlox] Refactor to use Truffle DSL
2022-09-13 18:21:31 +02:00
ctsk
3c12f50b6f
[tlox] Initial Expression parsing and evaluation
2022-09-13 17:31:30 +02:00
ctsk
1971ccef45
[jlox] experiment with stackless exception for Return
2022-09-10 21:17:15 +02:00
ctsk
12b0d6d0db
[jlox] Add function declaration
2022-09-10 21:09:53 +02:00
ctsk
b83e6735f7
[jlox] Fix if bug
2022-09-10 21:01:11 +02:00
ctsk
8a1f0f1217
[jlox] Add function calls
2022-09-10 19:42:05 +02:00
ctsk
a516090b4f
[jlox] Add for loops (using syntactic sugar!)
2022-09-10 11:46:18 +02:00
ctsk
a4c1076008
[jlox] Add while statement
2022-09-10 11:21:25 +02:00
ctsk
5327b3746a
[jlox] Add branching
2022-09-10 11:08:21 +02:00
ctsk
dd09bb748f
[jlox] Test Scanner
2022-09-09 22:27:46 +02:00
ctsk
fcd8b75ed6
Expression pretty printer
2022-09-09 12:35:27 +02:00
ctsk
2d1bad5701
Add assigments + scoping
2022-09-09 12:27:16 +02:00
ctsk
78cb1521df
Add ExprStatement PrintStatement
2022-09-08 18:57:34 +02:00
ctsk
57681d2eeb
Implement Expression interpreter
2022-09-08 11:30:26 +02:00
ctsk
e1247c3360
Parsing expressions done!
2022-09-08 10:04:33 +02:00
ctsk
e68f0edc1c
Code Generation for Expression trees
...
- Ditched Gradle because I couldn't get annotation processing to work,
switched to maven instead
2022-09-06 17:34:55 +02:00
ctsk
3857580ff0
Cleanup: Use idiomatic getOrDefault
2022-09-05 10:28:04 +02:00
ctsk
6dd507d76a
Implement the Scanner
2022-09-03 20:22:29 +02:00
ctsk
9510b57e11
Initialize Jlox
2022-09-02 22:08:24 +02:00
ctsk
1b0003e586
Challenge 1 + 2
2022-09-02 21:57:44 +02:00
ctsk
69a872fe2d
Add Nix env for Java and C
2022-08-31 21:21:03 +02:00