示例#1
0
  /** Creates a function call expression */
  @Override
  public Expr createCall(QuercusParser parser, Location location, ArrayList<Expr> args)
      throws IOException {
    Expr var = parser.createVar(_varName.toString());
    ExprFactory factory = parser.getExprFactory();

    return factory.createClassMethodCall(location, _className, var, args);
  }
  /** Creates a function call expression */
  @Override
  public Expr createCall(QuercusParser parser, Location location, ArrayList<Expr> args)
      throws IOException {
    ExprFactory factory = parser.getExprFactory();

    return factory.createThisMethod(location, _qThis, _nameExpr, args);
  }
示例#3
0
  /**
   * Parses a quercus string.
   *
   * @param code the source code
   * @return the parsed program
   * @throws IOException
   */
  public QuercusProgram parseCode(String code) throws IOException {
    QuercusProgram program = _evalCache.get(code);

    if (program == null) {
      program = QuercusParser.parseEval(this, code);
      _evalCache.put(code, program);
    }

    return program;
  }
示例#4
0
  /**
   * Parses a quercus string.
   *
   * @param code the source code
   * @return the parsed program
   * @throws IOException
   */
  public QuercusProgram parseEvalExpr(String code) throws IOException {
    // XXX: possible conflict with parse eval because of the
    // return value changes
    QuercusProgram program = _evalCache.get(code);

    if (program == null) {
      program = QuercusParser.parseEvalExpr(this, code);
      _evalCache.put(code, program);
    }

    return program;
  }
示例#5
0
 /**
  * Parses a function.
  *
  * @param args the arguments
  * @param code the source code
  * @return the parsed program
  * @throws IOException
  */
 public AbstractFunction parseFunction(String name, String args, String code) throws IOException {
   return QuercusParser.parseFunction(this, name, args, code);
 }
示例#6
0
 /**
  * Parses a quercus program.
  *
  * @param path the source file path
  * @return the parsed program
  * @throws IOException
  */
 public QuercusPage parse(ReadStream is) throws IOException {
   return new InterpretedPage(QuercusParser.parse(this, is));
 }
 /**
  * Returns the reference of the value.
  *
  * @param location
  */
 @Override
 public Expr createRef(QuercusParser parser) {
   return parser.getFactory().createRef(this);
 }