klyn.Application.eval
method

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

Description

Compiles and executes a Klyn script provided as a string.

Parameters

- code Klyn source code to compile and execute.

Throws

- SyntaxError if the code contains a syntax error.
- TypeError if the code contains a type error.
- Exception if compilation or execution fails.

Example

    result = Application.eval("40 + 2")
    print(result)