Package anvil.script.statements

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


        if (name.equals(parent.getName())) {
          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 {
View Full Code Here


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

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

    symbol = jj_consume_token(SYMBOL);
      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) {
View Full Code Here

    jj_consume_token(ASSIGN);
      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);
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.