Skip to content
Permalink
Browse files
[Truffle] Clarify and fix values for eval parse and inline source (-e).
  • Loading branch information
eregon committed Feb 25, 2015
1 parent 83b75ba commit cc92c1073a931ed236500979475d1a2ac71da1dd
Showing 1 changed file with 3 additions and 1 deletion.
@@ -94,7 +94,9 @@ public RubyRootNode parse(RubyContext context, Source source, Encoding defaultEn
}
}

final org.jruby.parser.ParserConfiguration parserConfiguration = new org.jruby.parser.ParserConfiguration(context.getRuntime(), 0, false, parserContext == ParserContext.TOP_LEVEL, true);
boolean isInlineSource = parserContext == ParserContext.SHELL;
boolean isEvalParse = parserContext == ParserContext.EVAL || parserContext == ParserContext.MODULE;
final org.jruby.parser.ParserConfiguration parserConfiguration = new org.jruby.parser.ParserConfiguration(context.getRuntime(), 0, isInlineSource, !isEvalParse, true);
parserConfiguration.setDefaultEncoding(defaultEncoding);

// Parse to the JRuby AST

0 comments on commit cc92c10

Please sign in to comment.