private static ObjectLiteral getLiteralNode(String literalStr) throws InvalidLiteralNode {
String scriptSource = "var lit = " + literalStr;
CompilerEnvirons ce = new CompilerEnvirons();
ScriptParserErrorReporter errorReporter = new ScriptParserErrorReporter();
ce.setGenerateDebugInfo(true);
ce.initFromContext(ContextFactory.getGlobal().enterContext());
ce.setErrorReporter(errorReporter);