interpreting lists, records, constructors

This commit is contained in:
Dustin Swan 2026-02-01 16:20:13 -07:00
parent 1d0f1d5423
commit b5bd084ee4
No known key found for this signature in database
GPG key ID: 30D46587E2100467
3 changed files with 30 additions and 6 deletions

View file

@ -27,7 +27,9 @@ console.log(tokenize(str));
// const tokens2 = tokenize("(x, y) => x + y");
// const tokens2 = tokenize('point { x = 3 }');
// const tokens2 = tokenize('add1 = (x \\ x + 1); add1 3');
const tokens2 = tokenize('sum = x y \\ x + y; sum 5 3');
// const tokens2 = tokenize('sum = x y \\ x + y; sum 5 3');
// const tokens2 = tokenize('[1, 2, 3]');
const tokens2 = tokenize('c = 5; { a = 3, b = c }');
const p2 = new Parser(tokens2);
const ast3 = p2.parse();
console.log(ast3);