Java Code Examples for org.mozilla.javascript.CompilerEnvirons#setGenerateDebugInfo()
The following examples show how to use
org.mozilla.javascript.CompilerEnvirons#setGenerateDebugInfo() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScriptDialog.java From hop with Apache License 2.0 | 6 votes |
public static ScriptNode parseVariables( Context cx, Scriptable scope, String source, String sourceName, int lineno, Object securityDomain ) { // Interpreter compiler = new Interpreter(); CompilerEnvirons evn = new CompilerEnvirons(); // evn.setLanguageVersion(Context.VERSION_1_5); evn.setOptimizationLevel( -1 ); evn.setGeneratingSource( true ); evn.setGenerateDebugInfo( true ); ErrorReporter errorReporter = new ToolErrorReporter( false ); Parser p = new Parser( evn, errorReporter ); ScriptNode tree = p.parse( source, "", 0 ); // IOException new NodeTransformer().transform( tree ); // Script result = (Script)compiler.compile(scope, evn, tree, p.getEncodedSource(),false, null); return tree; }
Example 2
Source File: ScriptValuesModDialog.java From hop with Apache License 2.0 | 5 votes |
public static ScriptNode parseVariables( Context cx, Scriptable scope, String source, String sourceName, int lineno, Object securityDomain ) { // Interpreter compiler = new Interpreter(); CompilerEnvirons evn = new CompilerEnvirons(); // evn.setLanguageVersion(Context.VERSION_1_5); evn.setOptimizationLevel( -1 ); evn.setGeneratingSource( true ); evn.setGenerateDebugInfo( true ); ErrorReporter errorReporter = new ToolErrorReporter( false ); Parser p = new Parser( evn, errorReporter ); ScriptNode tree = p.parse( source, "", 0 ); // IOException new NodeTransformer().transform( tree ); // Script result = (Script)compiler.compile(scope, evn, tree, p.getEncodedSource(),false, null); return tree; }
Example 3
Source File: ScriptDialog.java From pentaho-kettle with Apache License 2.0 | 5 votes |
public static ScriptNode parseVariables( Context cx, Scriptable scope, String source, String sourceName, int lineno, Object securityDomain ) { // Interpreter compiler = new Interpreter(); CompilerEnvirons evn = new CompilerEnvirons(); // evn.setLanguageVersion(Context.VERSION_1_5); evn.setOptimizationLevel( -1 ); evn.setGeneratingSource( true ); evn.setGenerateDebugInfo( true ); ErrorReporter errorReporter = new ToolErrorReporter( false ); Parser p = new Parser( evn, errorReporter ); ScriptNode tree = p.parse( source, "", 0 ); // IOException new NodeTransformer().transform( tree ); // Script result = (Script)compiler.compile(scope, evn, tree, p.getEncodedSource(),false, null); return tree; }
Example 4
Source File: ScriptValuesModDialog.java From pentaho-kettle with Apache License 2.0 | 5 votes |
public static ScriptNode parseVariables( Context cx, Scriptable scope, String source, String sourceName, int lineno, Object securityDomain ) { // Interpreter compiler = new Interpreter(); CompilerEnvirons evn = new CompilerEnvirons(); // evn.setLanguageVersion(Context.VERSION_1_5); evn.setOptimizationLevel( -1 ); evn.setGeneratingSource( true ); evn.setGenerateDebugInfo( true ); ErrorReporter errorReporter = new ToolErrorReporter( false ); Parser p = new Parser( evn, errorReporter ); ScriptNode tree = p.parse( source, "", 0 ); // IOException new NodeTransformer().transform( tree ); // Script result = (Script)compiler.compile(scope, evn, tree, p.getEncodedSource(),false, null); return tree; }