Skip to content

Commit db0d327

Browse files
eregonandrykonchin
authored andcommitted
Adapt to Prism changes
1 parent e4d8a56 commit db0d327

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/main/java/org/truffleruby/parser/YARPTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ public RubyNode visitForNode(Nodes.ForNode node) {
17291729
// in the block environment declare local variable only for parameter
17301730
// and skip declaration all the local variables defined in the block
17311731
String[] locals = new String[]{ parameterName };
1732-
final var block = new Nodes.BlockNode(locals, 0, blockParameters, body, bodyStartOffset, bodyLength);
1732+
final var block = new Nodes.BlockNode(locals, blockParameters, body, bodyStartOffset, bodyLength);
17331733
final var eachCall = new Nodes.CallNode(NO_FLAGS, node.collection, "each", null, block, node.startOffset,
17341734
node.length);
17351735

@@ -2727,7 +2727,7 @@ public RubyNode visitPostExecutionNode(Nodes.PostExecutionNode node) {
27272727
new Nodes.ConstantReadNode("Truffle", 0, 0),
27282728
new Nodes.ConstantReadNode("KernelOperations", 0, 0), 0, 0);
27292729
final var arguments = new Nodes.ArgumentsNode(NO_FLAGS, new Nodes.Node[]{ new Nodes.FalseNode(0, 0) }, 0, 0);
2730-
final var block = new Nodes.BlockNode(StringUtils.EMPTY_STRING_ARRAY, 0, null, node.statements, 0, 0);
2730+
final var block = new Nodes.BlockNode(StringUtils.EMPTY_STRING_ARRAY, null, node.statements, 0, 0);
27312731

27322732
final var callNode = new Nodes.CallNode(NO_FLAGS, receiver, "at_exit", arguments, block, 0, 0).accept(this);
27332733
final RubyNode rubyNode = new OnceNode(callNode);

src/main/java/org/truffleruby/parser/YARPTranslatorDriver.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ public static ParseResult parseToYARPAST(RubyLanguage language, RubySource rubyS
365365
int line = rubySource.getLineOffset() + 1;
366366
byte[] encoding = StringOperations.encodeAsciiBytes(rubySource.getEncoding().toString()); // encoding name is supposed to contain only ASCII characters
367367
boolean frozenStringLiteral = language.options.FROZEN_STRING_LITERALS;
368-
boolean verbose = true;
369368
var version = ParsingOptions.SyntaxVersion.V3_3_0;
370369
byte[][][] scopes;
371370

@@ -402,8 +401,8 @@ public static ParseResult parseToYARPAST(RubyLanguage language, RubySource rubyS
402401
scopes = new byte[0][][];
403402
}
404403

405-
byte[] parsingOptions = ParsingOptions.serialize(filepath, line, encoding, frozenStringLiteral, verbose,
406-
version, scopes);
404+
byte[] parsingOptions = ParsingOptions.serialize(filepath, line, encoding, frozenStringLiteral, version,
405+
scopes);
407406
byte[] serializedBytes = Parser.parseAndSerialize(sourceBytes, parsingOptions);
408407

409408
Nodes.Source yarpSource = parseEnvironment.yarpSource;

0 commit comments

Comments
 (0)