STRUCT
public struct MonkeyC: Compiler
Monkey Lang compiler for the Hermes VM
public var scopes = [CompilationScope()]
public var scopeIndex: Int = 0
public var constants: [VMBaseType] = []
public var symbolTable: SymbolTable
public init()
public init(withSymbolTable table: SymbolTable)
Creates a compiler instance with an existing SymbolTable
- Parameter table: The existing table
Name | Description |
---|---|
table | The existing table |
public mutating func compile(_ program: Program) throws
Name | Description |
---|---|
program | The program |
public mutating func compile(_ node: Node) throws
Name | Description |
---|---|
program | The program |