Package anvil.script.statements

Examples of anvil.script.statements.Statement


  }

  final public void ReturnStatement() throws ParseException {
  Token t;
  Expression expression = null;
  Statement stmt;
    t = jj_consume_token(RETURN);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case MODULE:
    case SYMBOL:
    case BEGIN:
View Full Code Here


  }

  final public void YieldStatement() throws ParseException {
  Token t;
  Expression expression = null;
  Statement stmt;
    t = jj_consume_token(YIELD);
    ListExpression();
      expression = (Expression)pop();
    if (flowPeek().getFunctionStatement().getType() == Type.CONSTRUCTOR) {
      if (expression != null) {
View Full Code Here

  FunctionStatement context = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case CARET:
      op = jj_consume_token(CARET);
      location = toLocation(op);
      Statement stmt = flowPeek();
      DefinitionStatement parent = stmt.getScopeStatement();
      context = stmt.getFunctionStatement();
      String name = "thunk$" + parent.getNextInlined();
      if (parent.typeOf() == Statement.ST_CLASS) {
        thunk = new MethodStatement(location, parent, context, false, name, null, ParameterListDeclaration.EMPTY);
      } else {
        thunk = new FunctionStatement(location, parent, context, false, name, null, ParameterListDeclaration.EMPTY);
View Full Code Here

        throw new ParseException();
      }
        location = toLocation(var != null ? var : t);

        if (var != null) {
          Statement stmt = flowPeek();
          if (stmt.isStaticRegion() && stmt.getFunctionStatement() == null) {
            error(location, "Explicit variable declaration modifier 'var' cannot be used in static initialization");
          } else {
            switch(role) {
            case LinkNode.ASSIGN:
            case LinkNode.GET:
View Full Code Here

      throw new ParseException();
    }
  }

  final public void ComprehensionForeach(ComprehensionNode compr, Statement root, Statement parent) throws ParseException {
  Statement stmt = null;
    stmt = ForeachStatementHeader(parent, null);
    parent.setChildStatement(stmt);
    if (root == null) {
      root = stmt;
    }
View Full Code Here

    Comprehension(compr, root, stmt);
  }

  final public void ComprehensionIf(ComprehensionNode compr, Statement root, Statement parent) throws ParseException {
  Token t;
  Statement stmt = null;
    t = jj_consume_token(IF);
    jj_consume_token(OPEN);
    Expression();
    jj_consume_token(CLOSE);
    stmt = new IfStatement(parent, toLocation(t), (Expression)pop());
View Full Code Here

  {
    try {
      long started = System.currentTimeMillis();
      Module();
      long ended = System.currentTimeMillis();
      Statement stmt = flowPeek();
      if (stmt == null || stmt.typeOf() != Statement.ST_MODULE) {
        error(new Location(_url), "Unexcepted end of file");
        throw new ForgingException(_listener);
      }
      ModuleStatement script = (ModuleStatement)stmt;
      if (_listener != null) {
View Full Code Here

TOP

Related Classes of anvil.script.statements.Statement

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.