Compiles the script (source read from
Reader
) for
later execution. Functionality is identical to
compile(String)
other than the way in which the source is
passed.
Returns:
An implementation of
CompiledScript
to be executed
later using one of its
eval
methods of
CompiledScript
.
Parameters:
-
script - The reader from which the script source is obtained.
Throws:
-
ScriptException - if compilation fails.
-
NullPointerException - if argument is null.