Package anvil.script.expression

Examples of anvil.script.expression.Node


    }
  }

  final public void UnaryPostfixExpression() throws ParseException {
  Token op;
  Node child;
    IsExpression();
    label_43:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case MINUSMINUS:
View Full Code Here


          break;
        case OPEN:
          jj_consume_token(OPEN);
          ExpressionStart();
          jj_consume_token(CLOSE);
        Node right = pop();
        Node left = pop();
        push(new DynamicHasNode(left, right));
          break;
        default:
          jj_la1[122] = jj_gen;
          jj_consume_token(-1);
View Full Code Here

      default:
        jj_la1[126] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      Node child = pop();
      switch (child.typeOf()) {
      case Node.EXPR_VARIABLE:
        error(toLocation(op), "Cannot delete variables");
        break;
      case Node.EXPR_INVOKE:
        error(toLocation(op), "Cannot delete methods");
View Full Code Here

        }
        parameters = (Parent)pop();
        if (parameters.hasNamedParameters()) {
          error(toLocation(t), "Named parameters are ignored in anonymous invokes");
        }
        Node method = pop();
        Node self = pop();
        push(new DynamicInvokeNode(self, method, parameters));
          break;
        case SYMBOL:
          t = jj_consume_token(SYMBOL);
                   isMethod = false;
          if (jj_2_23(2)) {
            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
            case OPEN:
              jj_consume_token(OPEN);
              ArgumentList();
              jj_consume_token(CLOSE);
              break;
            case BEGIN:
              InlineFunction();
                             push(new ExpressionList(pop()));
              break;
            default:
              jj_la1[140] = jj_gen;
              jj_consume_token(-1);
              throw new ParseException();
            }
          isMethod = true;
          } else {
            ;
          }
        if (terminated) {
          error(toLocation(t), "Empty brackets terminate variable expression");
        }
        if (isMethod) {
          parameters = (Parent)pop();
          if (parameters.hasNamedParameters()) {
            error(toLocation(t), "Named parameters are ignored in anonymous invokes");
          }
          push(new InvokeNode(pop(), t.image, parameters));
        } else {
          push(new AttributeNode(pop(), t.image));
        }
          break;
        case CLASS:
          jj_consume_token(CLASS);
        push(new ClassOfNode(pop()));
          break;
        case SIZEOF:
          jj_consume_token(SIZEOF);
        push(new SizeOfNode(pop()));
          break;
        case TYPEOF:
          jj_consume_token(TYPEOF);
        push(new TypeOfNode(pop()));
          break;
        case CLONEOF:
          jj_consume_token(CLONEOF);
        push(new CloneNode(pop()));
          break;
        case COPYOF:
          jj_consume_token(COPYOF);
        push(new CopyNode(pop()));
          break;
        default:
          jj_la1[141] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
        break;
      default:
        jj_la1[142] = jj_gen;
        if (jj_2_24(2)) {
          t = jj_consume_token(OPEN_BRACKET);
          List(false, false);
          jj_consume_token(CLOSE_BRACKET);
      if (terminated) {
        error(toLocation(t), "Empty brackets terminate variable expression");
      }
      Node expression = pop();
      Node self = pop();
      push(new ReferenceNode(self, expression));
        } else {
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case OPEN_BRACKET:
            t = jj_consume_token(OPEN_BRACKET);
View Full Code Here

      for(int i=0; i<n; i++) {
        if (isfalse != null) {
          isfalse.bind();
        }
        Node child = _types.getChild(i);
        if (child.typeOf() == Node.EXPR_TYPE) {
          code.aload(l_data);
          child.compile(context, Node.GET_TYPE);
          code.invokevirtual(pool.addMethodRef(context.TYPE_ANY, "isInstanceOf", "(Lanvil/script/Type;)Z"));
        } else {
          child.compile(context, Node.GET_BOOLEAN);
        }
        isfalse = code.if_eq();
        code.go_to(istrue);
      }
     
View Full Code Here

TOP

Related Classes of anvil.script.expression.Node

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.