Constructor
new Compiler(settings) → {Compiler}
Create a new Compiler.
Parameters:
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
settings |
Object | {} | Configuration.
Properties
|
Properties:
Name | Type | Description |
---|---|---|
ast |
AST | Compiler's current AST. |
entity |
Entity | Compiler's current Entity. |
- Source:
Returns:
Instance of the compiler.
- Type
- Compiler
Methods
_getJavaScriptAST(input) → {AST}
Parse a Buffer of JavaScript into an Abstract Syntax Tree (AST).
Parameters:
Name | Type | Description |
---|---|---|
input |
Buffer | Input JavaScript to parse. |
- Source:
Returns:
- Type
- AST
(static) _fromJavaScript(body)
Creates a new Compiler instance from a JavaScript contract.
Parameters:
Name | Type | Description |
---|---|---|
body |
Buffer | Content of the JavaScript to evaluate. |
- Source:
Returns:
Compiler