Skip to content

Commit 60efa87

Browse files
eregonandrykonchin
authored andcommitted
Use assignNodePositionInSource() when translating CallNode
1 parent 965a621 commit 60efa87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,12 @@ public RubyNode visitCallNode(Nodes.CallNode node) {
443443
boolean ignoreVisibility = node.receiver == null;
444444
boolean isVCall = arguments.length == 0 && (node.opening_loc == null || node.closing_loc == null); // only `foo` without arguments and `()`
445445
boolean isAttrAssign = methodName.endsWith("=");
446-
return new RubyCallNode(new RubyCallNodeParameters(receiver, methodName, null,
446+
var rubyCallNode = new RubyCallNode(new RubyCallNodeParameters(receiver, methodName, null,
447447
EmptyArgumentsDescriptor.INSTANCE, translatedArguments, false, ignoreVisibility, isVCall, false,
448448
isAttrAssign));
449+
450+
assignNodePositionInSource(node, rubyCallNode);
451+
return rubyCallNode;
449452
}
450453

451454
public RubyNode visitCallOperatorAndWriteNode(Nodes.CallOperatorAndWriteNode node) {

0 commit comments

Comments
 (0)