Package dtool.ast.definitions.Module

Examples of dtool.ast.definitions.Module.DeclarationModule


 
  /* ----------------------------------------------------------------- */
 
  public AbstractParser.NodeResult<Module> parseModule(String defaultModuleName, Path compilationUnitPath) {
    assertNotNull(defaultModuleName);
    DeclarationModule md = parseModuleDeclaration();
   
    ArrayView<ASTNode> members = parseDeclarations(null, true);
    assertTrue(lookAhead() == DeeTokens.EOF);
    advanceSubChannelTokens(); // Ensure pending whitespace is consumed as well
    assertTrue(getSourcePosition() == lookAheadElement().getStartPos());
    //assertTrue(getSourcePosition() == getSource().length()); //This is not true if explicit EOF token is present
   
    SourceRange modRange = new SourceRange(0, getSourcePosition());
   
    if(md != null) {
      return result(false, conclude(modRange,
        new Module(md.getModuleSymbol(), md, members, compilationUnitPath)));
    } else {
      return result(false, conclude(modRange,
        Module.createModuleNoModuleDecl(defaultModuleName, members, compilationUnitPath, modRange)));
    }
  }
View Full Code Here


      break;
    }
    parse.consumeRequired(DeeTokens.SEMICOLON);
    Token[] comments = parse.parseEndDDocComments();
   
    return parse.conclude(new DeclarationModule(comments, arrayViewG(packagesList), moduleId));
  }
View Full Code Here

      findDefUnitInScope(targetModule, search);
    }
  }
 
  private static void findDefUnitInModuleDec(Module module, CommonDefUnitSearch search) {
    DeclarationModule decMod = module.md;
    INamedElement moduleElement;
    if(decMod != null) {
     
      if(decMod.packages.length == 0 || decMod.packages[0] == "") {
        moduleElement = module;
View Full Code Here

TOP

Related Classes of dtool.ast.definitions.Module.DeclarationModule

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.