Package anvil.script.statements

Examples of anvil.script.statements.MethodStatement


        }
        flowPush(function);
        flowPush(function.getChildStatement());

      } else {
        MethodStatement method;
        if ((context == null) && name.equals(parent.getName())) {
          is_constructor = true;
          method = new ConstructorStatement(location, parent, is_synchronized, name, document, parameters);
          if (parent.getConstructor() != null) {
            error(location, "Constructor is already declared for class '"+parent+"'");
          }
        } else {
          method = new MethodStatement(location, parent, context, is_synchronized, name, document, parameters);
        }
        method.setParentStatement(flowPeek());
        if (target.lookupLocalDeclaration(name) == null) {
          parent.declare(method);
          if (context != null) {
            context.declare(name, method);
          }
        } else {
          error(location, "Entity '" + name + "' is already declared");
        }
        flowPush(method);
        flowPush(method.getChildStatement());

      }
    jj_consume_token(BEGIN);
      if (is_constructor) {
        ConstructorInvoke();
View Full Code Here


      DefinitionStatement parent = stmt.getScopeStatement();
      FunctionStatement context  = stmt.getFunctionStatement();
      FunctionStatement function;
      String name = "inline$" + parent.getNextInlined();
      if (parent.typeOf() == Statement.ST_CLASS) {
        function = new MethodStatement(toLocation(t), parent, context, false, name, null, parameters);
      } else {
        function = new FunctionStatement(toLocation(t), parent, context, false, name, null, parameters);
      }
      function.setParentStatement(flowPeek());
      parent.declare(function);
View Full Code Here

      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);
      }
      thunk.setParentStatement(flowPeek());
      parent.declare(thunk);
View Full Code Here

TOP

Related Classes of anvil.script.statements.MethodStatement

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.