//generated by abstract-syntax-gen package de.peeeq.wurstscript.luaAst; import java.util.*; @SuppressWarnings({"cast", "unused", "rawtypes"}) public class LuaAst { public static LuaFunction LuaFunction(String name, LuaParams params, LuaStatements body) { return new LuaFunctionImpl(name, params, body); } public static LuaMethod LuaMethod(LuaExpr receiver, String name, LuaParams params, LuaStatements body) { return new LuaMethodImpl(receiver, name, params, body); } public static LuaVariable LuaVariable(String name, LuaExprOpt initialValue) { return new LuaVariableImpl(name, initialValue); } public static LuaAssignment LuaAssignment(LuaExpr left, LuaExpr right) { return new LuaAssignmentImpl(left, right); } public static LuaWhile LuaWhile(LuaExpr cond, LuaStatements body) { return new LuaWhileImpl(cond, body); } public static LuaIf LuaIf(LuaExpr cond, LuaStatements thenStmts, LuaStatements elseStmts) { return new LuaIfImpl(cond, thenStmts, elseStmts); } public static LuaBreak LuaBreak() { return new LuaBreakImpl(); } public static LuaReturn LuaReturn(LuaExprOpt retVal) { return new LuaReturnImpl(retVal); } public static LuaNoExpr LuaNoExpr() { return new LuaNoExprImpl(); } public static LuaExprBinary LuaExprBinary(LuaExpr leftExpr, LuaOpBinary op, LuaExpr right) { return new LuaExprBinaryImpl(leftExpr, op, right); } public static LuaExprUnary LuaExprUnary(LuaOpUnary opU, LuaExpr right) { return new LuaExprUnaryImpl(opU, right); } public static LuaExprFunctionAbstraction LuaExprFunctionAbstraction(LuaParams params, LuaStatements body) { return new LuaExprFunctionAbstractionImpl(params, body); } public static LuaTableConstructor LuaTableConstructor(LuaTableFields tableFields) { return new LuaTableConstructorImpl(tableFields); } public static LuaExprFieldAccess LuaExprFieldAccess(LuaExpr receiver, String fieldName) { return new LuaExprFieldAccessImpl(receiver, fieldName); } public static LuaExprArrayAccess LuaExprArrayAccess(LuaExpr left, LuaExprlist indexes) { return new LuaExprArrayAccessImpl(left, indexes); } public static LuaExprFunctionCall LuaExprFunctionCall(LuaFunction func, LuaExprlist arguments) { return new LuaExprFunctionCallImpl(func, arguments); } public static LuaExprMethodCall LuaExprMethodCall(LuaExpr receiver, LuaMethod method, LuaExprlist arguments) { return new LuaExprMethodCallImpl(receiver, method, arguments); } public static LuaExprFunctionCallByName LuaExprFunctionCallByName(String funcName, LuaExprlist arguments) { return new LuaExprFunctionCallByNameImpl(funcName, arguments); } public static LuaExprFunctionCallE LuaExprFunctionCallE(LuaExpr funcExpr, LuaExprlist arguments) { return new LuaExprFunctionCallEImpl(funcExpr, arguments); } public static LuaTableNamedField LuaTableNamedField(String fieldName, LuaExpr val) { return new LuaTableNamedFieldImpl(fieldName, val); } public static LuaTableExprField LuaTableExprField(LuaExpr fieldKey, LuaExpr val) { return new LuaTableExprFieldImpl(fieldKey, val); } public static LuaTableSingleField LuaTableSingleField(LuaExpr val) { return new LuaTableSingleFieldImpl(val); } public static LuaExprIntVal LuaExprIntVal(String valI) { return new LuaExprIntValImpl(valI); } public static LuaExprRealVal LuaExprRealVal(String valR) { return new LuaExprRealValImpl(valR); } public static LuaExprStringVal LuaExprStringVal(String valS) { return new LuaExprStringValImpl(valS); } public static LuaExprBoolVal LuaExprBoolVal(boolean valB) { return new LuaExprBoolValImpl(valB); } public static LuaExprFuncRef LuaExprFuncRef(LuaFunction func) { return new LuaExprFuncRefImpl(func); } public static LuaExprNull LuaExprNull() { return new LuaExprNullImpl(); } public static LuaLiteral LuaLiteral(String luaCode) { return new LuaLiteralImpl(luaCode); } public static LuaExprVarAccess LuaExprVarAccess(LuaVariable var) { return new LuaExprVarAccessImpl(var); } public static LuaOpOr LuaOpOr() { return new LuaOpOrImpl(); } public static LuaOpAnd LuaOpAnd() { return new LuaOpAndImpl(); } public static LuaOpEquals LuaOpEquals() { return new LuaOpEqualsImpl(); } public static LuaOpUnequals LuaOpUnequals() { return new LuaOpUnequalsImpl(); } public static LuaOpLessEq LuaOpLessEq() { return new LuaOpLessEqImpl(); } public static LuaOpLess LuaOpLess() { return new LuaOpLessImpl(); } public static LuaOpGreaterEq LuaOpGreaterEq() { return new LuaOpGreaterEqImpl(); } public static LuaOpGreater LuaOpGreater() { return new LuaOpGreaterImpl(); } public static LuaOpPlus LuaOpPlus() { return new LuaOpPlusImpl(); } public static LuaOpConcatString LuaOpConcatString() { return new LuaOpConcatStringImpl(); } public static LuaOpMinus LuaOpMinus() { return new LuaOpMinusImpl(); } public static LuaOpMult LuaOpMult() { return new LuaOpMultImpl(); } public static LuaOpDiv LuaOpDiv() { return new LuaOpDivImpl(); } public static LuaOpMod LuaOpMod() { return new LuaOpModImpl(); } public static LuaOpFloorDiv LuaOpFloorDiv() { return new LuaOpFloorDivImpl(); } public static LuaOpNot LuaOpNot() { return new LuaOpNotImpl(); } public static LuaModel LuaModel(LuaCompilationUnit ... elements ) { LuaModel l = new LuaModelImpl(); l.addAll(Arrays.asList(elements)); return l; } public static LuaModel LuaModel(Iterable elements ) { LuaModel l = new LuaModelImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (LuaCompilationUnit elem : elements) l.add(elem); return l; } public static LuaCompilationUnit LuaCompilationUnit(LuaStatement ... elements ) { LuaCompilationUnit l = new LuaCompilationUnitImpl(); l.addAll(Arrays.asList(elements)); return l; } public static LuaCompilationUnit LuaCompilationUnit(Iterable elements ) { LuaCompilationUnit l = new LuaCompilationUnitImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (LuaStatement elem : elements) l.add(elem); return l; } public static LuaParams LuaParams(LuaVariable ... elements ) { LuaParams l = new LuaParamsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static LuaParams LuaParams(Iterable elements ) { LuaParams l = new LuaParamsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (LuaVariable elem : elements) l.add(elem); return l; } public static LuaStatements LuaStatements(LuaStatement ... elements ) { LuaStatements l = new LuaStatementsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static LuaStatements LuaStatements(Iterable elements ) { LuaStatements l = new LuaStatementsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (LuaStatement elem : elements) l.add(elem); return l; } public static LuaExprlist LuaExprlist(LuaExpr ... elements ) { LuaExprlist l = new LuaExprlistImpl(); l.addAll(Arrays.asList(elements)); return l; } public static LuaExprlist LuaExprlist(Iterable elements ) { LuaExprlist l = new LuaExprlistImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (LuaExpr elem : elements) l.add(elem); return l; } public static LuaTableFields LuaTableFields(LuaTableField ... elements ) { LuaTableFields l = new LuaTableFieldsImpl(); l.addAll(Arrays.asList(elements)); return l; } public static LuaTableFields LuaTableFields(Iterable elements ) { LuaTableFields l = new LuaTableFieldsImpl(); if (elements instanceof Collection) l.addAll((Collection) elements); else for (LuaTableField elem : elements) l.add(elem); return l; } }