klyn.Application.compile
method

    public static native compile(code as String) throws SyntaxError, TypeError, Exception

Description

Compiles a Klyn script provided as a string. <p> This is intended as the programmatic entry point for automation (including tests). </p>

Parameters

Parameter | Description
--- | ---
`code` | Klyn source code to compile.

Throws

- SyntaxError if the code contains a syntax error.
- TypeError if the code contains a type error.
- Exception if compilation fails for any other reason.

Example

    code = "x as Int = 1"
    Application.compile(code)