Commit 9759947b authored by Alexander Weigl's avatar Alexander Weigl

parent ref for ASTNode.java

parent b765012c
......@@ -26,8 +26,11 @@ package edu.kit.iti.formal.psdbg.parser.ast;
import edu.kit.iti.formal.psdbg.parser.Visitable;
import edu.kit.iti.formal.psdbg.parser.Visitor;
import lombok.Getter;
import lombok.Setter;
import org.antlr.v4.runtime.ParserRuleContext;
import javax.annotation.Nullable;
/**
* @author Alexander Weigl
* @version 1 (27.04.17)
......@@ -39,6 +42,12 @@ public abstract class ASTNode<T extends ParserRuleContext>
*/
protected T ruleContext;
/**
*
*/
@Getter @Setter @Nullable
protected ASTNode parent;
/**
*
*/
......@@ -56,6 +65,7 @@ public abstract class ASTNode<T extends ParserRuleContext>
*
* @return
*/
@Nullable
public String getOrigin() {
if (ruleContext != null) {
String src = ruleContext.getStart().getInputStream().getSourceName();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment