Package dtool.ast.definitions

Examples of dtool.ast.definitions.CommonDefinition


    ArrayList<Token> commentsToCheck = defUnit.getDocComments() == null ? new ArrayList<Token>() :
      new ArrayList<>(Arrays.asList(defUnit.getDocComments()));
   
   
    Token[] comments = defUnit.getDocComments();
    CommonDefinition commonDefinition = defUnit instanceof CommonDefinition ? (CommonDefinition) defUnit : null;
   
    if(comments != null && comments.length > 0 && !(defUnit instanceof Module) && commonDefinition != null) {
      int extendedStartPos = commonDefinition.getExtendedStartPos();
      int extendedEndPos = commonDefinition.getExtendedEndPos();
     
      if(comments.length == 1) {
        assertTrue(
          comments[0].getEndPos() == extendedEndPos ||
          comments[0].getStartPos() == extendedStartPos);
View Full Code Here


    Iterator<? extends IASTNode> iter = block.getMembersIterator();
    while(iter.hasNext()) {
      IASTNode node = iter.next();
     
      if(node instanceof CommonDefinition) {
        CommonDefinition def = (CommonDefinition) node;
        def.setAttribute(attribute);
      } else if(node instanceof INonScopedContainer) {
        applyBasicAttributes(attribute, (INonScopedContainer) node);
      }
    }
  }
View Full Code Here

     
      if(anotherProtectionAttribPresent(descendantNode)) {
        continue; // Do not descend, other attrib takes precedence
      }
      if(descendantNode instanceof CommonDefinition) {
        CommonDefinition def = (CommonDefinition) descendantNode;
        def.setProtection(protection);
      } else if(descendantNode instanceof DeclarationImport && protection == EProtection.PUBLIC) {
        DeclarationImport declImport = (DeclarationImport) descendantNode;
        declImport.isTransitive = true;
      } else if(descendantNode instanceof INonScopedContainer) {
        applyProtectionAttributes(protection, (INonScopedContainer) descendantNode);
View Full Code Here

  }
 
  public CommonDefinition getDefToTest(String source, String name) {
    Module module = DeeParser.parseSource(source, "attribs_test").module;
    ASTNode node = MiscNodeUtils.searchDefUnit(module, name, ASTNodeTypes.DECLARATION_ATTRIB);
    CommonDefinition def = assertCast(node, CommonDefinition.class);
    assertEquals(def.getName(), name);
    return def;
  }
View Full Code Here

  public static int elementFlagsForNamedElement(INamedElement defElement) {
    EArcheType archeType = defElement.getArcheType();
    int modifiers = elementFlagsForArchetype(archeType);
   
    if(defElement instanceof CommonDefinition) {
      CommonDefinition commonDefinition = (CommonDefinition) defElement;
      modifiers |= getCommonDefinitionModifiersInfo(commonDefinition);
    }
   
    if(defElement instanceof IntrinsicDefUnit) {
      assertTrue(defElement.isLanguageIntrinsic());
View Full Code Here

TOP

Related Classes of dtool.ast.definitions.CommonDefinition

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.