Examples of lookupDeclaration()


Examples of anvil.core.Modules.lookupDeclaration()

  protected Type lookupLibrary(ErrorListener context)
  {
    Zone zone = _script.getAddress().getZone();
    Modules modules = zone.getModules();
    Type type = modules.lookupDeclaration(_name.get(_index-1));
    if (type != null) {
      return type;
    }

    StringBuffer libname = new StringBuffer(32);
View Full Code Here

Examples of anvil.script.ClassType.lookupDeclaration()

 
 
  public Type lookupInheritedDeclaration(String name)
  {
    ClassType base = getBaseClass();
    return (base != null) ? base.lookupDeclaration(name) : null;
  }


  public boolean isInstanceOf(Type ofType)
  { 
View Full Code Here

Examples of anvil.script.ClassType.lookupDeclaration()

      case Type.CLASS:
        {
          ClassType clazz = (ClassType)type;
          if (hasMoreSymbols()) {
            symbol = consumeSymbol();
            type = clazz.lookupDeclaration(symbol);
            break;
          }
          if (!hasArgs()) {
            listener.error(_location, "Syntax error: argument list expected after '"+_name.toString(1)+"'");
            return null;
View Full Code Here

Examples of anvil.script.ClassType.lookupDeclaration()

  {
    Type type;
    if (_base != null) {
      ClassType classtype = _base.getClassType();
      if (classtype != null) {
        if ((type = classtype.lookupDeclaration(name)) != null) {
          return type;
        }
      }
    }
    if (_interfaces != null) {
View Full Code Here

Examples of anvil.script.IncrementalScope.lookupDeclaration()

    IncrementalScope scope = this;   
    int i = 0;
    int n = name.size();
    while(i < n) {
      String s = name.get(i++);
      Type type = scope.lookupDeclaration(s);
      if (type == null) {
        if (i < n) {
          SyntheticNamespace ns = new SyntheticNamespace(scope, s);
          scope.addDeclaration(ns);
          scope = ns;
View Full Code Here

Examples of anvil.script.InterfaceType.lookupDeclaration()

    InterfaceType base;
    Type type;
    int n = _bases.length;
    for(int i=0; i<n; i++) {
      if ((base = _bases[i].getInterfaceType()) != null) {
        if ((type = base.lookupDeclaration(name)) != null) {
          return type;
        }
      }
    }
    return null;
View Full Code Here

Examples of anvil.script.InterfaceType.lookupDeclaration()

    if (_interfaces != null) {
      InterfaceRef[] bases = _interfaces;
      InterfaceType base;
      for(int i=0; i<bases.length; i++) {
        if ((base = bases[i].getInterfaceType()) != null) {
          if ((type = base.lookupDeclaration(name)) != null) {
            return type;
          }
        }
      }
    }
View Full Code Here

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

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

    }
    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

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

      ;
    }
    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
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.