Skip to content

Commit

Permalink
[Truffle] Clarify and fix values for eval parse and inline source (-e).
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Feb 25, 2015
1 parent 83b75ba commit cc92c10
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc92c10

Please sign in to comment.