//generated by abstract-syntax-gen package de.peeeq.wurstscript.jassAst; import java.util.*; @SuppressWarnings({"cast", "unused", "rawtypes"}) public class JassAst { public static JassProg JassProg(JassTypeDefs defs, JassVars globals, JassNatives natives, JassFunctions functions) { return new JassProgImpl(defs, globals, natives, functions); } public static JassTypeDef JassTypeDef(String name, String ext) { return new JassTypeDefImpl(name, ext); } public static JassNative JassNative(String name, JassSimpleVars params, String returnType) { return new JassNativeImpl(name, params, returnType); } public static JassSimpleVar JassSimpleVar(String type, String name) { return new JassSimpleVarImpl(type, name); } public static JassArrayVar JassArrayVar(String type, String name) { return new JassArrayVarImpl(type, name); } public static JassInitializedVar JassInitializedVar(String type, String name, JassExpr val, boolean isBj) { return new JassInitializedVarImpl(type, name, val, isBj); } public static JassFunction JassFunction(String name, JassSimpleVars params, String returnType, JassVars locals, JassStatements body, boolean isCompiletimeNative) { return new JassFunctionImpl(name, params, returnType, locals, body, isCompiletimeNative); } public static JassStmtIf JassStmtIf(JassExpr cond, JassStatements thenBlock, JassStatements elseBlock) { return new JassStmtIfImpl(cond, thenBlock, elseBlock); } public static JassStmtLoop JassStmtLoop(JassStatements body) { return new JassStmtLoopImpl(body); } public static JassStmtSet JassStmtSet(String left, JassExpr right) { return new JassStmtSetImpl(left, right); } public static JassStmtSetArray JassStmtSetArray(String left, JassExpr index, JassExpr right) { return new JassStmtSetArrayImpl(left, index, right); } public static JassStmtCall JassStmtCall(String funcName, JassExprlist arguments) { return new JassStmtCallImpl(funcName, arguments); } public static JassStmtReturn JassStmtReturn(JassExpr returnValue) { return new JassStmtReturnImpl(returnValue); } public static JassStmtReturnVoid JassStmtReturnVoid() { return new JassStmtReturnVoidImpl(); } public static JassStmtExitwhen JassStmtExitwhen(JassExpr cond) { return new JassStmtExitwhenImpl(cond); } public static JassExprBinary JassExprBinary(JassExpr leftExpr, JassOpBinary op, JassExpr right) { return new JassExprBinaryImpl(leftExpr, op, right); } public static JassExprUnary JassExprUnary(JassOpUnary opU, JassExpr right) { return new JassExprUnaryImpl(opU, right); } public static JassExprFunctionCall JassExprFunctionCall(String funcName, JassExprlist arguments) { return new JassExprFunctionCallImpl(funcName, arguments); } public static JassExprIntVal JassExprIntVal(String valI) { return new JassExprIntValImpl(valI); } public static JassExprRealVal JassExprRealVal(String valR) { return new JassExprRealValImpl(valR); } public static JassExprStringVal JassExprStringVal(String valS) { return new JassExprStringValImpl(valS); } public static JassExprBoolVal JassExprBoolVal(boolean valB) { return new JassExprBoolValImpl(valB); } public static JassExprFuncRef JassExprFuncRef(String funcName) { return new JassExprFuncRefImpl(funcName); } public static JassExprNull JassExprNull() { return new JassExprNullImpl(); } public static JassExprVarAccess JassExprVarAccess(String varName) { return new JassExprVarAccessImpl(varName); } public static JassExprVarArrayAccess JassExprVarArrayAccess(String varName, JassExpr index) { return new JassExprVarArrayAccessImpl(varName, index); } public static JassOpOr JassOpOr() { return new JassOpOrImpl(); } public static JassOpAnd JassOpAnd() { return new JassOpAndImpl(); } public static JassOpEquals JassOpEquals() { return new JassOpEqualsImpl(); } public static JassOpUnequals JassOpUnequals() { return new JassOpUnequalsImpl(); } public static JassOpLessEq JassOpLessEq() { return new JassOpLessEqImpl(); } public static JassOpLess JassOpLess() { return new JassOpLessImpl(); } public static JassOpGreaterEq JassOpGreaterEq() { return new JassOpGreaterEqImpl(); } public static JassOpGreater JassOpGreater() { return new JassOpGreaterImpl(); } public static JassOpPlus JassOpPlus() { return new JassOpPlusImpl(); } public static JassOpMinus JassOpMinus() { return new JassOpMinusImpl(); } public static JassOpMult JassOpMult() { return new JassOpMultImpl(); } public static JassOpDiv JassOpDiv() { return new JassOpDivImpl(); } public static JassOpNot JassOpNot() { return new JassOpNotImpl(); } public static JassProgs JassProgs(JassProg ... elements ) { JassProgs l = new JassProgsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassProgs JassProgs(Iterable elements ) { JassProgs l = new JassProgsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassProg elem : elements) l.add(elem); return l; } public static JassNatives JassNatives(JassNative ... elements ) { JassNatives l = new JassNativesImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassNatives JassNatives(Iterable elements ) { JassNatives l = new JassNativesImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassNative elem : elements) l.add(elem); return l; } public static JassTypeDefs JassTypeDefs(JassTypeDef ... elements ) { JassTypeDefs l = new JassTypeDefsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassTypeDefs JassTypeDefs(Iterable elements ) { JassTypeDefs l = new JassTypeDefsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassTypeDef elem : elements) l.add(elem); return l; } public static JassVars JassVars(JassVar ... elements ) { JassVars l = new JassVarsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassVars JassVars(Iterable elements ) { JassVars l = new JassVarsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassVar elem : elements) l.add(elem); return l; } public static JassSimpleVars JassSimpleVars(JassSimpleVar ... elements ) { JassSimpleVars l = new JassSimpleVarsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassSimpleVars JassSimpleVars(Iterable elements ) { JassSimpleVars l = new JassSimpleVarsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassSimpleVar elem : elements) l.add(elem); return l; } public static JassFunctions JassFunctions(JassFunction ... elements ) { JassFunctions l = new JassFunctionsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassFunctions JassFunctions(Iterable elements ) { JassFunctions l = new JassFunctionsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassFunction elem : elements) l.add(elem); return l; } public static JassStatements JassStatements(JassStatement ... elements ) { JassStatements l = new JassStatementsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassStatements JassStatements(Iterable elements ) { JassStatements l = new JassStatementsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassStatement elem : elements) l.add(elem); return l; } public static JassExprlist JassExprlist(JassExpr ... elements ) { JassExprlist l = new JassExprlistImpl(); l.addAll(Arrays.asList(elements)); return l; } public static JassExprlist JassExprlist(Iterable elements ) { JassExprlist l = new JassExprlistImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (JassExpr elem : elements) l.add(elem); return l; } }