Examples of declare()


Examples of abstrasy.Interface.declare()

            //
            // c'est parti...
            //

            if (tn == PCoder.PC_FUNCTION)
                iface.declare(symbole.getStr(), Node.TYPE_FUNCTION);

            else
                throw new InterpreterException(StdErrors.Syntax_error);

            return null;
View Full Code Here

Examples of anvil.script.statements.ClassStatement.declare()

          error(location, "Static methods may not used as constructors");
        }
        FunctionStatement function = new FunctionStatement(location, parent, context, is_synchronized, name, document, parameters);
        function.setParentStatement(flowPeek());
        if (target.lookupDeclaration(name) == null) {
          parent.declare(function);
          if (context != null) {
            context.declare(name, function);
          }
        } else {
          error(location, "Entity '" + name + "' is already declared");
View Full Code Here

Examples of anvil.script.statements.ClassStatement.declare()

        } 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");
View Full Code Here

Examples of anvil.script.statements.DefinitionStatement.declare()

      FunctionStatement  context = flowPeek().getFunctionStatement();

      FunctionStatement function = new FunctionStatement(toLocation(t), parent, context, is_synchronized, name, document, parameters);
      function.setParentStatement(flowPeek());
      if (target.lookupDeclaration(name) == null) {
        parent.declare(function);
        if (context != null) {
          context.declare(name, function);
        }
      } else {
        error(toLocation(t), "Entity '" + name + "' is already declared");
View Full Code Here

Examples of anvil.script.statements.DefinitionStatement.declare()

        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);
      flowPush(function);
      flowPush(function.getChildStatement());
      push(new InlinedFunctionNode(context, function));
    label_10:
    while (true) {
View Full Code Here

Examples of anvil.script.statements.DefinitionStatement.declare()

    jj_consume_token(BEGIN);
      String name = s.image;
      DefinitionStatement parent = flowPeek().getScopeStatement();
      InterfaceStatement decl = new InterfaceStatement(location, parent, name, t.document, interfaces);
      if (parent.lookupDeclaration(name) == null) {
        parent.declare(decl);
      } else {
        error(location, "Entity '"+name+"' is already declared");
      }
      flowPush(decl);
    label_12:
View Full Code Here

Examples of anvil.script.statements.DefinitionStatement.declare()

    }
    jj_consume_token(BEGIN);
      DefinitionStatement parent = flowPeek().getDefinitionStatement();
      ClassStatement classtype = new ClassStatement(location, parent, name, t.document, base, interfaces);
      if (parent.lookupDeclaration(name) == null && !parent.isEntityReserved(name)) {
        parent.declare(classtype);
      } else {
        error(location, "Entity '"+name+"' is already declared");
      }
      flowPush(classtype);
    label_13:
View Full Code Here

Examples of anvil.script.statements.DefinitionStatement.declare()

      Location location = toLocation(symbol);
      String name = symbol.image;
      DefinitionStatement target = flowPeek().getDefinitionStatement();
      VariableStatement var = null;
      if (target.lookupDeclaration(name) == null && !target.isEntityReserved(name)) {
        var = target.declare(location, name, expr, document, statik);
      } else {
        error(location, "Entity '" + name + "' is already declared");
      }
      if (var != null) {
        flowPush(var);
View Full Code Here

Examples of anvil.script.statements.DefinitionStatement.declare()

      Location location = toLocation(symbol);
      String name = symbol.image;
      DefinitionStatement target = flowPeek().getDefinitionStatement();
      ConstantVariableStatement constant = new ConstantVariableStatement(location, target, name, null, keyword.document);
      if (target.lookupDeclaration(name) == null && !target.isEntityReserved(name)) {
        target.declare(constant);
      } else {
        error(location, "Entity '" + name + "' is already declared");
      }
      flowPush(constant);
    ValueExpression();
View Full Code Here

Examples of anvil.script.statements.DefinitionStatement.declare()

        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);
      flowPush(thunk);
      flowPush(thunk.getChildStatement());
      break;
    default:
      jj_la1[124] = jj_gen;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.