Package anvil.script.parser

Examples of anvil.script.parser.ExpressionParser


    Location location = getLocation();
    Parent parameters;
  
    String params = tag.getValue("params");
    if (params != null) {
      ExpressionParser p = new ExpressionParser(parser, location, params);
      parameters = p.parseParameterList();
     
    } else {
      int size = 0;
      int n = tag.getLength();
      for (int i=0; i<n; i++) {
View Full Code Here



  public static final Expression[] parseForeachExpression(String expression, Location location, TemplateParser parser)
  {
    if (expression != null) {
      ExpressionParser expressionParser = new ExpressionParser(parser, location, expression);
      return expressionParser.parseForeachExpression();
    } else {
      parser.error(location, "Expression attribute missing");
      return new Expression[0];   
    }
  }  
View Full Code Here

 

  public static final Expression doParseExpression(int type, String expression, Location location, TemplateParser parser)
  {
    if (expression != null) {
      ExpressionParser expressionParser =
        new ExpressionParser(parser, location, expression);
      return expressionParser.parseExpression(type);
    } else {
      parser.error(location, "Expression attribute missing");
      return Expression.NULL;
    }
  }  
View Full Code Here

          break;
           
        case Attribute.TYPE_EXPR:
          value = value.trim();
          if (value.length() > 0) {
            ExpressionParser p = new ExpressionParser(parser, parser.getLocation(), value);
            node = p.parseExpression(p.TYPE_VALUE).getChild();
          } else {
            node = ConstantNode.UNDEFINED;
          }
          break;
        }
View Full Code Here

  public void parse(TemplateParser parser, Tag tag)
  {
    String expr = tag.getValue("value");
    if (expr != null) {
      ExpressionParser p = new ExpressionParser(parser, getLocation(), expr);
      ExpressionList list = p.parseExpressionList();
      int n = list.childs();
      _expressions = new Expression[n];
      for(int i=0; i<n; i++) {
        _expressions[i] = new Expression(list.getChild(i), getLocation());
      }
View Full Code Here

  public ParameterListDeclaration parseParameters(TemplateParser parser, Tag tag)
  {
    ParameterListDeclaration parameters = new ParameterListDeclaration();
    String params = tag.getValue("params");
    if (params != null) {
      ExpressionParser p = new ExpressionParser(parser, parser.getLocation(), params);
      p.parseParameterListDeclaration(parameters);
   
    } else {
      parameters.open();
      int n = tag.getLength();
      for(int i=0; i<n; i++) {
View Full Code Here

    String expr = tag.getValue("expr");
    if (expr == null) {
      expr = tag.getValue("do");
    }
    if (expr != null) {
      ExpressionParser p = new ExpressionParser(parser, getLocation(), expr);
      Object[] list = p.parseForExpressionList();
      _init = (Expression[]) list[0];
      _condition = (Expression) list[1];
      _action = (Expression[]) list[2];
    }
    _label = parseLabel(parser, tag);
View Full Code Here

    Parent parameters;
    Location location = getLocation();
  
    String params = tag.getValue("params");
    if (params != null) {
      ExpressionParser p = new ExpressionParser(parser, parser.getLocation(), params);
      parameters = p.parseParameterList();
   
    } else {
      int size = 0;
      int n = tag.getLength();
      for (int i=0; i<n; i++) {
View Full Code Here

TOP

Related Classes of anvil.script.parser.ExpressionParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.