/** * Creates an assignment using this value as the right hand side. */ public override Expr createAssignFrom(QuercusParser parser, AbstractVarExpr leftHandSide) { ExprFactory factory = parser.getExprFactory(); return(factory.createAssignRef(leftHandSide, _expr)); }
/** * Creates a class field Foo::${bar} */ public override Expr createClassField(QuercusParser parser, Expr name) { ExprFactory factory = parser.getExprFactory(); string className = _var; string specialClassName = getSpecialClassName(); if ("self".equals(specialClassName)) { className = parser.getSelfClassName(); return(factory.createClassField(className, name)); } else if ("parent".equals(specialClassName)) { className = parser.getParentClassName(); return(factory.createClassField(className, name)); } else if ("static".equals(specialClassName)) { return(factory.createClassVirtualField(name)); } else { return(factory.createClassField(className, name)); } }
/** * Creates an assignment using this value as the right hand side. */ public Expr createAssignFrom(QuercusParser parser, AbstractVarExpr leftHandSide) { ExprFactory factory = parser.getExprFactory(); return(factory.createAssign(leftHandSide, this)); }
/** * Creates a class field $class::foo */ public override Expr createClassConst(QuercusParser parser, Expr name) { ExprFactory factory = parser.getExprFactory(); string className = _value.ToString(); if ("self".equals(className)) { className = parser.getSelfClassName(); return(factory.createClassConst(className, name)); } else if ("parent".equals(className)) { className = parser.getParentClassName(); return(factory.createClassConst(className, name)); } else if ("static".equals(className)) { return(factory.createClassVirtualConst(name)); } else { return(factory.createClassConst(className, name)); } }
// // function call creation // /** * Creates a function call expression */ public override Expr createCall(QuercusParser parser, Location location, ArrayList <Expr> args) { ExprFactory factory = parser.getExprFactory(); return(factory.createThisMethod(location, _qThis, _nameExpr, args)); }
// // function call creation // /** * Creates a function call expression */ public override Expr createCall(QuercusParser parser, Location location, ArrayList <Expr> args) { ExprFactory factory = parser.getExprFactory(); return(factory.createClassMethodCall(location, _className, _varName, args)); }
// // function call creation // /** * Creates a function call expression */ public Expr createCall(QuercusParser parser, Location location, ArrayList <Expr> args) { ExprFactory factory = parser.getExprFactory(); return(factory.createVarFunction(location, this, args)); }
// // function call creation // /** * Creates a function call expression */ public override Expr createCall(QuercusParser parser, Location location, ArrayList <Expr> args) { ExprFactory factory = parser.getExprFactory(); Expr var = parser.createVar(_varName); return(factory.createClassVirtualMethodCall(location, var, args)); }
// // function call creation // /** * Creates a function call expression */ public override Expr createCall(QuercusParser parser, Location location, ArrayList <Expr> args) { /* * if (_className.equals(_name)) * return factory.createClassConstructor(location, _className, _name, args); * else * return factory.createClassMethodCall(location, _className, _name, args); */ ExprFactory factory = parser.getExprFactory(); return(factory.createClassMethodCall(location, _className, _name, args)); }
// // expression creation // /** * Creates a class field Foo::bar */ public override Expr createClassConst(QuercusParser parser, StringValue name) { ExprFactory factory = parser.getExprFactory(); string className = _var; string specialClassName = getSpecialClassName(); if ("self".equals(specialClassName)) { className = parser.getSelfClassName(); return(factory.createClassConst(className, name)); } else if ("parent".equals(specialClassName)) { className = parser.getParentClassName(); if (className != null) { return(factory.createClassConst(className, name)); } else { // trait's parent @is not known at parse time return(factory.createTraitParentClassConst(parser.getClassName(), name)); } } else if ("static".equals(specialClassName)) { return(factory.createClassVirtualConst(name)); } else { return(factory.createClassConst(className, name)); } }
/** * Creates the reference * @param location */ public override Expr createRef(QuercusParser parser) { return(parser.getExprFactory().createRef(this)); }
/** * Creates the assignment. */ public override Expr createAssignRef(QuercusParser parser, Expr value) { return(parser.getExprFactory().createAssignRef(this, value)); }
/** * Creates a class field $class::${foo} */ public Expr createClassField(QuercusParser parser, Expr name) { ExprFactory factory = parser.getExprFactory(); return(factory.createClassField(this, name)); }
// // class field refs $class::$bar // /** * Creates a class field $class::foo */ public Expr createClassConst(QuercusParser parser, StringValue name) { ExprFactory factory = parser.getExprFactory(); return(factory.createClassConst(this, name)); }