Package anvil.script.expression

Examples of anvil.script.expression.LinkNode


        Statement parent = getParentStatement();
        FunctionStatement function = getFunctionStatement();
        if (function.getType() == Type.CONSTRUCTOR) {
          BlockStatement block = function.getBlockStatement();
          if (parent == function && block.isEmpty()) {
            _expression = new Expression(new LinkNode(this, location,
              new Name().add(Name.SUPER, "super"), parameters, LinkNode.SUPER), location);

          } else {
            parser.error(location, "Superclass constructor invoke must appear as a first statement (characters between tags are considered statements)");
          }
        } else {
          parser.error(location, "Superclass constructor invoke may only appear in constructor");
        }
       
      } else {
        // super.method(params, ...)
        _expression = new Expression(new LinkNode(this, location,
            new Name().add(Name.SUPER, "super").add(method), parameters, LinkNode.GET), location);
           
      }
     
    } else {
      if (method == null) {
        parser.error(location, "Attribute 'method' not given");
        return;
      }
     
      if (from == null) {
        // method(params, ...)
        _expression = new Expression(new LinkNode(this, location,
            new Name().add(method), parameters, LinkNode.GET), location);
           
      } else {
        // expr.method(params, ...)
        Expression self = Grammar.parseExpression(from, location, parser);
View Full Code Here


  private Expression buildExpr(Location location, String handler, String method, ExpressionList args)
  {
    if (handler != null) {
      handler = handler.trim();
      return new Expression(new LinkNode(this, location,
        new Name().add(_namespace).add(handler), args,
        LinkNode.GET) ,location);
       
    } else if (method != null) {
      return new Expression(new InvokeNode(FRAME, method, EMPTY_ARGS), location);
View Full Code Here

      Location location,
      Name entity,
      Name[] decls,
      boolean withStar)
  {
    LinkNode link = new LinkNode(this, location, entity);
    Import imprt = new Import(null, location, entity, new TypeRef(link), entity.as(), decls, withStar);
    addImport(imprt);
  }
View Full Code Here

      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:
      jj_la1[24] = jj_gen;
View Full Code Here

  }

  final public LinkNode EntityReference(Location location) throws ParseException {
  Name name;
    name = Name(null);
    {if (true) return new LinkNode(flowPeek(), location, name);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

    {if (true) return new LinkNode(flowPeek(), location, name);}
    throw new Error("Missing return statement in function");
  }

  final public void InterfaceReference(Location location, List interfaces) throws ParseException {
  LinkNode link;
    link = EntityReference(location);
      interfaces.add(new InterfaceRef(link));
  }
View Full Code Here

  final public void Class() throws ParseException {
  Token t;
  Token s;
  ClassRef base = null;
  InterfaceRef[] interfaces = new InterfaceRef[0];
  LinkNode link;
    t = jj_consume_token(CLASS);
    s = jj_consume_token(SYMBOL);
    Location location = toLocation(t);
    String name = s.image;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
View Full Code Here

          break;
        case MODULE:
        case SYMBOL:
          name = Name(null);
        Location location = toLocation(t);
        LinkNode link = new LinkNode(flowPeek(), location, name, null, LinkNode.GET);
        push(new InstanceOfNode(pop(), link, location));
          break;
        default:
          jj_la1[120] = jj_gen;
          jj_consume_token(-1);
View Full Code Here

    default:
      jj_la1[132] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
      push(new LinkNode(flowPeek(), location, name, (Parent)pop(), LinkNode.NEW));
  }
View Full Code Here

        throw new ParseException();
      }
    } else {
      ;
    }
    push(new LinkNode(flowPeek(), location, name, args, role));
    ObjectConstruct(role);
  }
View Full Code Here

TOP

Related Classes of anvil.script.expression.LinkNode

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.