ast_generator/ast

28 lines
297 B
Plaintext
Raw Normal View History

2024-07-21 20:56:42 +01:00
Statement {
2024-07-21 22:35:34 +01:00
Enum(Enum)
Node(Node)
2024-07-21 20:56:42 +01:00
}
Enum(name: Name, nodes: Node[])
Node(name: Name, params: Param[])
2024-07-21 22:35:34 +01:00
Param {
Named(name: Name, type_: Type)
Unnamed(Type)
}
2024-07-21 20:56:42 +01:00
Type {
2024-07-21 22:35:34 +01:00
Name(Name)
Optional(Type)
Multiple(Type)
2024-07-21 20:56:42 +01:00
}
2024-07-21 22:35:34 +01:00
Name(
string,
line: number,
col: number,
)
2024-07-21 20:56:42 +01:00