Commit 4c6ca789 authored by Per Bothner's avatar Per Bothner

* KawaScriptEngine.java (compile): Fix arguments to parse.

Specifically, we don't want INTERACTIVE to be set, as that
cases compilation errors.
Fixes GitLab issue #70 "When evaluated through the javax.script API,
define raises a ClassCastException: Cannot cast IntNum to Location".
parent a5f9754b
Pipeline #129370743 failed with stage
in 5 minutes and 43 seconds
2020-03-24 Per Bothner <per@bothner.com>
* KawaScriptEngine.java (compile): Fix arguments to parse.
Specifically, we don't want INTERACTIVE to be set, as that
cases compilation errors.
Fixes GitLab issue #70 "When evaluated through the javax.script API,
define raises a ClassCastException: Cannot cast IntNum to Location".
2019-12-28 Per Bothner <per@bothner.com>
* Declaration.java (maybeSourceName): New method.
......
......@@ -102,8 +102,7 @@ public class KawaScriptEngine extends AbstractScriptEngine
try
{
Compilation comp =
factory.language.parse(port, messages,
Language.PARSE_IMMEDIATE|Language.PARSE_INTERACTIVE_MODULE);
factory.language.parse(port, messages, Language.PARSE_FOR_EVAL);
if (messages.seenErrors())
throw new SyntaxException(messages);
ModuleExp mexp = comp.getModule();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment