Package anvil.script.expression

Examples of anvil.script.expression.Expression


    }
    if (!Grammar.isValidIdentifier(name)) {
      parser.error(location, "Attribute 'name' is not valid identifier");
      return;
    }
    Expression expr = null;
    if (value != null) {
      expr = Grammar.parseExpression(value, location, parser);
    }
    if (tag.contains("static")) {
      declare(location, name, expr, parser.getDocument(), true);
View Full Code Here


    }
    if (value == null) {
      parser.error(location, "Attribute 'value' missing from constant type");
      return;
    }
    Expression expr = null;
    if (value != null) {
      expr = Grammar.parseExpression(value, location, parser);
    }
    declare(new ConstantVariableStatement(location, this, name, expr, parser.getDocument()));
  }
View Full Code Here

  {
    Location location = _expression.getLocation();
    AssignmentNode assignment = new AssignmentNode(location, 2);
    assignment.setChild(0, new MemberVariableNode(_classtype, _classtype, this));
    assignment.setChild(1, _expression.getChild());
    return new Expression(assignment, location);
  }
View Full Code Here

    default:
      jj_la1[20] = jj_gen;
      ;
    }
      String symbol = param.image;
      Expression defaultexpr = null;
      if (t != null) {
        defaultexpr = new Expression(pop(), toLocation(t));
      } else {
        if (parameters.hasDefaultValues()) {
          error(toLocation(param), "Parameters with default values must appear last");
          defaultexpr = null;
        }
View Full Code Here

      jj_consume_token(OPEN);
      ArgumentList();
      jj_consume_token(CLOSE);
      jj_consume_token(SEMICOLON);
      Location location = toLocation(t);
      flowPushChild(new EvalStatement(flowPeek(), location, new Expression(
          new LinkNode(flowPeek(), location, new Name().add(t), (Parent)pop(),
          LinkNode.SUPER), location)));
      flowPop();
      break;
    default:
View Full Code Here

    jj_consume_token(SEMICOLON);
  }

  final public void VariableTypePart(boolean statik, String document) throws ParseException {
  Token symbol;
  Expression expr = null;
    symbol = jj_consume_token(SYMBOL);
      Location location = toLocation(symbol);
      String name = symbol.image;
      DefinitionStatement target = flowPeek().getDefinitionStatement();
      VariableStatement var = null;
View Full Code Here

    }
  }

  final public void StatementModifier(Statement stmt) throws ParseException {
  Token t;
  Expression expr;
  IfStatement ifStmt;
    Statement context = flowPeek();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case IF:
      t = jj_consume_token(IF);
View Full Code Here

        for(count--; count>=0; count--) {
          types.setChild(count, ((Expression)pop()).getChild(0));
        }
      }
      Location location = toLocation(t);
      Expression assignment = (Expression)pop();
      Statement context = (trystmt != null) ? trystmt : flowPeek();
      if (trystmt == null) {
        trystmt = getEnclosingTryBlock();
      }
      CatchStatement catchstmt = new CatchStatement(trystmt, location, assignment, types);
View Full Code Here

  }

  final public void ExpressionStatement() throws ParseException {
  Statement stmt;
    Expression();
    Expression expr = (Expression)pop();
    stmt = new EvalStatement(flowPeek(), expr.getLocation(), expr);
    StatementModifier(stmt);
  }
View Full Code Here

            break label_21;
          }
          jj_consume_token(COMMA);
            spaces.append(' ');
        }
          list.add(new Expression(new ConstantNode(spaces.toString()), toLocation(t)));
        break;
      default:
        jj_la1[58] = jj_gen;
        ;
      }
View Full Code Here

TOP

Related Classes of anvil.script.expression.Expression

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.