Skip to content
Snippets Groups Projects
Commit 91e67017 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

do not treat String constants specially when creating calls

parent 9b307f04
Branches
No related tags found
No related merge requests found
...@@ -227,9 +227,7 @@ public class RASTUtils { ...@@ -227,9 +227,7 @@ public class RASTUtils {
fn = ((ConstantNode) fn).getValue(); fn = ((ConstantNode) fn).getValue();
} }
SourceSection sourceSection = sourceUnavailable ? RSyntaxNode.SOURCE_UNAVAILABLE : RSyntaxNode.EAGER_DEPARSE; SourceSection sourceSection = sourceUnavailable ? RSyntaxNode.SOURCE_UNAVAILABLE : RSyntaxNode.EAGER_DEPARSE;
if (fn instanceof String) { if (fn instanceof ReadVariableNode) {
return RCallNode.createCall(sourceSection, RASTUtils.createReadVariableNode(((String) fn)), signature, arguments);
} else if (fn instanceof ReadVariableNode) {
return RCallNode.createCall(sourceSection, (ReadVariableNode) fn, signature, arguments); return RCallNode.createCall(sourceSection, (ReadVariableNode) fn, signature, arguments);
} else if (fn instanceof NamedRNode) { } else if (fn instanceof NamedRNode) {
return RCallNode.createCall(RSyntaxNode.SOURCE_UNAVAILABLE, (NamedRNode) fn, signature, arguments); return RCallNode.createCall(RSyntaxNode.SOURCE_UNAVAILABLE, (NamedRNode) fn, signature, arguments);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment