Significant progress on AST codegen.

This commit is contained in:
2023-09-04 18:38:09 -07:00
parent edec706ed4
commit f06ea93dc4
24 changed files with 670 additions and 55 deletions

View File

@ -21,21 +21,5 @@ enum class NodeType(val parent: NodeType? = null) {
FunctionCall(Expression),
If(Expression),
ImportDeclaration(Declaration),
FunctionDefinition(Definition);
val parents: Set<NodeType>
init {
val calculatedParents = mutableListOf<NodeType>()
var self = this
while (true) {
calculatedParents.add(self)
if (self.parent != null) {
self = self.parent!!
} else {
break
}
}
parents = calculatedParents.toSet()
}
FunctionDefinition(Definition)
}