Skip to content

Latest commit

 

History

History
80 lines (54 loc) · 1.06 KB

File metadata and controls

80 lines (54 loc) · 1.06 KB

STRUCT

MonkeyC

public struct MonkeyC: Compiler

Monkey Lang compiler for the Hermes VM

Properties

scopes

public var scopes = [CompilationScope()]

scopeIndex

public var scopeIndex: Int = 0

constants

public var constants: [VMBaseType] = []

symbolTable

public var symbolTable: SymbolTable

Methods

init()

public init()

init(withSymbolTable:)

public init(withSymbolTable table: SymbolTable)

Creates a compiler instance with an existing SymbolTable

  • Parameter table: The existing table

Parameters

Name Description
table The existing table

compile(_:)

public mutating func compile(_ program: Program) throws

Parameters

Name Description
program The program

compile(_:)

public mutating func compile(_ node: Node) throws

Parameters

Name Description
program The program