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

don't force source sections for loops

parent ebd780e3
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ import com.oracle.truffle.r.runtime.nodes.RNode;
import com.oracle.truffle.r.runtime.nodes.RSyntaxCall;
import com.oracle.truffle.r.runtime.nodes.RSyntaxElement;
import com.oracle.truffle.r.runtime.nodes.RSyntaxLookup;
import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
/** Marker class for loops. */
public abstract class AbstractLoopNode extends OperatorNode {
......@@ -47,9 +48,9 @@ public abstract class AbstractLoopNode extends OperatorNode {
if (rootNode instanceof RRootNode) {
function = rootNode.toString();
}
SourceSection sourceSection = getSourceSection();
SourceSection sourceSection = getLazySourceSection();
int startLine = -1;
if (sourceSection != null) {
if (sourceSection != null && sourceSection != RSyntaxNode.LAZY_DEPARSE && sourceSection != RSyntaxNode.INTERNAL && sourceSection != RSyntaxNode.SOURCE_UNAVAILABLE) {
startLine = sourceSection.getStartLine();
}
RSyntaxElement call = ((RSyntaxCall) this).getSyntaxLHS();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment