type T = { type: "num"; num: number } | { type: "str"; str: string };
const x: T = { type: "num", num: 17 };
match(x, [
[{ type: "num", num: n }, n + n],
[{ type: "str", str: s }, s.length],
]);
- (Nov 16, 2024) lexical declarations (
let
,const
) and lexical variables - (Nov 21, 2024) arrow functions
(args) => {body}
and(args) => expr
- arrow functions initializer expressions, e.g.,
(x = 12) => x
; - function declarations
- return statement
- if statement
- while loop
- for loop
- object literals
- array literals
- class declarations
- type declarations
type T = ...
and typed lexical declarationsconst x: T = ...
- arrow functions parameter types, e.g.,
(x: T) => body
- arrow functions type parameters, e.g.,
<T>(x: X) => body
- (Nov 18, 2024)
splice(() => {body})
-
rewrite_rules(x, [pattern, literals?, template]*, expr)
(aka.let-syntax
withsyntax-rules
)
- script serialization
- exports
- dependency tracking for module visits and invocations
- (Nov 23, 2024) make a proper pretty printer (using prettier for now)
- add source locations to ast/stx forms (most likely to tags).
- (Nov 19, 2024) unit testing
- code coverage reports
- remove unused exports in code base