CompilerEnvirons

Compiler configuration shared by the lexer, parser and code generator.

Ported subset notes: initFromContext arrives with Context in Phase 3. The security-controller fields and the deprecated optimizationLevel pair are out of the port's scope: there is no bytecode compiler, so interpretedMode is the only switch.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Extension to ECMA: if 'function ' is not followed by '(', assume starts a memberExpr.

Link copied to clipboard

Mozilla sources use the C preprocessor.

Link copied to clipboard

Allows usage of "super" everywhere, simulating that we are inside a method.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Whether source information is generated. Without it, evaluating "toString" on JavaScript functions produces only "native code" for the body, which is not fully ECMA conformant.

Link copied to clipboard

"IDE" mode: slightly more expensive computations, such as helpful error bounds.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Full error recovery: parse errors do not throw, and the parser attempts to build a full syntax tree from the input. Useful for IDEs and other frontends.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Copies the settings that matter for compilation out of cx.

Link copied to clipboard
Link copied to clipboard
fun setHomeObject(homeObject: Scriptable?)