public static native compile(code as String) throws SyntaxError, TypeError, Exception
Compiles a Klyn script provided as a string. <p> This is intended as the programmatic entry point for automation (including tests). The fragment inherits the imports visible at the call site, but not local variables. Compilation does not execute the fragment or add its declarations to the caller. The supplied String is compiled as-is, without additional reindentation. Triple-quoted literals remove their common margin when the String is created. </p>
| Parameter | Description |
|---|---|
code | Klyn source code to compile. |
code = "x as Int = 1" Application.compile(code)