//generated by abstract-syntax-gen package de.peeeq.wurstscript.jassIm; import java.util.*; @SuppressWarnings({"cast", "unused", "rawtypes"}) class ImStmtsImpl extends ImStmts { 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) this).set(i, (ImStmt) newElement); } @Override public T match(ImPrintable.Matcher matcher) { return matcher.case_ImStmts(this); } @Override public void match(ImPrintable.MatcherVoid matcher) { matcher.case_ImStmts(this); } @Override public T match(Element.Matcher matcher) { return matcher.case_ImStmts(this); } @Override public void match(Element.MatcherVoid matcher) { matcher.case_ImStmts(this); } @Override public void accept(Visitor v) { v.visit(this); } @Override public void clearAttributes() { for (ImStmt child : this) { child.clearAttributes(); } clearAttributesLocal(); } @Override public void clearAttributesLocal() { } /** */ public void print(java.lang.Appendable sb, int indent) { de.peeeq.wurstscript.translation.imtranslation.ImPrinter.print((ImStmts)this, sb, indent); } /** */ public String toString() { return de.peeeq.wurstscript.translation.imtranslation.ImPrinter.asString((ImStmts)this); } /** */ public void translate(java.util.List stmts, de.peeeq.wurstscript.jassAst.JassFunction f, de.peeeq.wurstscript.translation.imtojass.ImToJassTranslator translator) { de.peeeq.wurstscript.translation.imtojass.StatementTranslation.translate((ImStmts)this, stmts, f, translator); } /** */ public ImFunction getNearestFunc() { return de.peeeq.wurstscript.translation.imtojass.ImAttributes.getNearestFunc((ImStmts)this); } /** */ public void runStatements(de.peeeq.wurstscript.intermediatelang.interpreter.ProgramState globalState, de.peeeq.wurstscript.intermediatelang.interpreter.LocalState localState) { de.peeeq.wurstscript.intermediatelang.interpreter.RunStatement.run((ImStmts)this, globalState, localState); } /** */ public de.peeeq.wurstscript.ast.Element attrTrace() { return de.peeeq.wurstscript.translation.imtojass.ImAttributes.getTrace((ImStmts)this); } /** */ public ImProg attrProg() { return de.peeeq.wurstscript.translation.imtojass.ImAttributes.getProg((ImStmts)this); } }