//generated by abstract-syntax-gen package de.peeeq.wurstscript.jassAst; import java.util.*; @SuppressWarnings({"cast", "unused", "rawtypes"}) class JassExprFunctionCallImpl implements JassExprFunctionCall{ JassExprFunctionCallImpl(String funcName, JassExprlist arguments) { if (funcName == null) throw new IllegalArgumentException("Element funcName must not be null."); if (arguments == null) throw new IllegalArgumentException("Element arguments must not be null."); this.funcName = funcName; this.arguments = arguments; arguments.setParent(this); } private Element parent; public Element getParent() { return parent; } public void setParent(Element parent) { if (parent != null && this.parent != null) { throw new Error("Cannot change parent of element " + this.getClass().getSimpleName() + ", as it is already used in another tree." + "Use the copy method to create a new tree or remove the tree from its old parent or set the parent to null before moving the tree. "); } this.parent = parent; } public void replaceBy(Element other) { if (parent == null) throw new RuntimeException("Node not attached to tree."); for (int i=0; i action) { action.accept(this.arguments); } public int size() { return 1; } @Override public JassExprFunctionCall copy() { JassExprFunctionCall result = new JassExprFunctionCallImpl(funcName, (JassExprlist) this.arguments.copy()); return result; } @Override public JassExprFunctionCall copyWithRefs() { JassExprFunctionCall res = copy(); return res; } @Override public void clearAttributes() { arguments.clearAttributes(); clearAttributesLocal(); } @Override public void clearAttributesLocal() { zzattr_getLine_state = 0; zzattr_getProg_state = 0; zzattr_attrFunctionCall_state = 0; zzattr_attrFuncDef_state = 0; } @Override public void accept(Visitor v) { v.visit(this); } @Override public T match(JassFuncRef.Matcher matcher) { return matcher.case_JassExprFunctionCall(this); } @Override public void match(JassFuncRef.MatcherVoid matcher) { matcher.case_JassExprFunctionCall(this); } @Override public T match(Element.Matcher matcher) { return matcher.case_JassExprFunctionCall(this); } @Override public void match(Element.MatcherVoid matcher) { matcher.case_JassExprFunctionCall(this); } @Override public T match(JassExpr.Matcher matcher) { return matcher.case_JassExprFunctionCall(this); } @Override public void match(JassExpr.MatcherVoid matcher) { matcher.case_JassExprFunctionCall(this); } @Override public String toString() { return "JassExprFunctionCall(" + funcName + ", " +arguments+")"; } public boolean structuralEquals(Element e) { if (e instanceof JassExprFunctionCall) { JassExprFunctionCall o = (JassExprFunctionCall) e; return java.util.Objects.equals(funcName, o.getFuncName()) && this.arguments.structuralEquals(o.getArguments()); } else { return false; } } /** */ public String getType() { return de.peeeq.wurstscript.frotty.jassAttributes.JassExprAttr.getType((JassExprFunctionCall)this); } // circular = null private int zzattr_getLine_state = 0; private int zzattr_getLine_cache; /** */ public int getLine() { if (zzattr_getLine_state == 0) { try { zzattr_getLine_state = 1; zzattr_getLine_cache = de.peeeq.wurstscript.frotty.jassValidator.LineMapAttr.getLine((JassExprFunctionCall)this); } finally { zzattr_getLine_state = 0; } zzattr_getLine_state = 2; } else if (zzattr_getLine_state == 1) { throw new CyclicDependencyError(this, "getLine"); } return zzattr_getLine_cache; } // circular = null private int zzattr_getProg_state = 0; private JassProg zzattr_getProg_cache; /** */ public JassProg getProg() { if (zzattr_getProg_state == 0) { try { zzattr_getProg_state = 1; zzattr_getProg_cache = de.peeeq.wurstscript.frotty.jassValidator.LineMapAttr.getProg((JassExprFunctionCall)this); } finally { zzattr_getProg_state = 0; } zzattr_getProg_state = 2; } else if (zzattr_getProg_state == 1) { throw new CyclicDependencyError(this, "getProg"); } return zzattr_getProg_cache; } // circular = null private int zzattr_attrFunctionCall_state = 0; private JassFunction zzattr_attrFunctionCall_cache; /** "gets the function for a function call"*/ public JassFunction attrFunctionCall() { if (zzattr_attrFunctionCall_state == 0) { try { zzattr_attrFunctionCall_state = 1; zzattr_attrFunctionCall_cache = de.peeeq.wurstscript.frotty.jassAttributes.FunctionCall.get((JassExprFunctionCall)this); } finally { zzattr_attrFunctionCall_state = 0; } zzattr_attrFunctionCall_state = 2; } else if (zzattr_attrFunctionCall_state == 1) { throw new CyclicDependencyError(this, "attrFunctionCall"); } return zzattr_attrFunctionCall_cache; } // circular = null private int zzattr_attrFuncDef_state = 0; private JassFunction zzattr_attrFuncDef_cache; /** */ public JassFunction attrFuncDef() { if (zzattr_attrFuncDef_state == 0) { try { zzattr_attrFuncDef_state = 1; zzattr_attrFuncDef_cache = de.peeeq.wurstscript.attributes.JassAttributes.attrFuncDef((JassExprFunctionCall)this); } finally { zzattr_attrFuncDef_state = 0; } zzattr_attrFuncDef_state = 2; } else if (zzattr_attrFuncDef_state == 1) { throw new CyclicDependencyError(this, "attrFuncDef"); } return zzattr_attrFuncDef_cache; } /** */ public void print(java.lang.StringBuilder sb, boolean withSpace) { de.peeeq.wurstscript.jassprinter.ExprPrinter.print((JassExprFunctionCall)this, sb, withSpace); } }