ast-generator
Advanced tools
Changelog
[0.6.0] - 2025-01-31
settings
block, i.e.
settings {
output = "../gen-here-plz.ts"
}
instead of the old (no longer supported):
set output "../gen-here-plz.ts"
discriminator
, and output
for now. More settings will be
added later.generated-ast.ts
by default, but allow specifying it through
output = "../somewhere-else.ts"
Changelog
[0.5.0] - 2025-01-30
@MyUnion
syntax. This is
now "just" MyUnion
. The definition itself determines whether it's a union or a basic
node.op: ">" | "<" | ">=" | "<="
(previously the
closest best thing was op: string
).Changelog
[0.4.0] - 2025-01-29
.children
and .descendants
iterator properties, which
enable you to iterate over all of its children in a type-safe manner.set discriminator "_kind"
in the
grammar.type
.visit()
method. You can now use the built-in
.children
and .descendants
properties (available on every Node) or defineMethod()
to implement your own custom visitors.Changelog
[0.2.3] - 2025-01-08
The data argument must be of type string or an instance of Buffer, TypedArray, or DataView.
Changelog
[0.2.0] - 2024-02-28
_kind
and range
fields non-enumerable.