Package dtool.ast

Examples of dtool.ast.IASTNode


 
  public static void findDefUnits(CommonDefUnitSearch search, Iterator<? extends IASTNode> iter,
      boolean isSequentialLookup, boolean importsOnly) {
   
    while(iter.hasNext()) {
      IASTNode node = iter.next();
     
      int refOffset = search.refOffset;
      // Check if we have passed the reference offset
      if(isSequentialLookup && refOffset < node.getStartPos()) {
        return;
      }
     
      evaluateNodeForSearch(search, isSequentialLookup, importsOnly, node);
      if(search.isFinished() && search.findOnlyOne) // TODO make BUG HERE
View Full Code Here


      paramReparseCheck(nodeSource, false);
    }
   
    public static void paramReparseCheck(String nodeSource, boolean reparseAsFunctionParam) {
      DeeParser unambigParser = new DeeParser(nodeSource);
      IASTNode unambigParsedParameter = reparseAsFunctionParam ?
        unambigParser.parseFunctionParameter() : unambigParser.parseTemplateParameter();
       
      Object ambigParsedParameterResult = parseAmbigParameter(nodeSource);
     
      ASTNode nodeToCompareAgainst = null;
      if(ambigParsedParameterResult instanceof IFunctionParameter) {
        nodeToCompareAgainst = reparseAsFunctionParam ? (ASTNode) ambigParsedParameterResult : null;
      } else if(ambigParsedParameterResult instanceof TemplateParameter) {
        nodeToCompareAgainst = !reparseAsFunctionParam ? (ASTNode) ambigParsedParameterResult : null;
      } else {
        AmbiguousParameter ambigParsedParameter = (AmbiguousParameter) ambigParsedParameterResult;
        nodeToCompareAgainst = reparseAsFunctionParam ?
          ambigParsedParameter.convertToFunction().asNode() : ambigParsedParameter.convertToTemplate();
      }
     
      if(nodeToCompareAgainst != null) {
        assertTrue(unambigParser.lookAhead() == DeeTokens.EOF);
        DeeParsingChecks.checkNodeEquality(unambigParsedParameter.asNode(), nodeToCompareAgainst);
      } else {
        assertTrue(unambigParser.lookAhead() != DeeTokens.EOF ||
          collectNodeErrors(unambigParsedParameter.asNode()).size() > 0);
      }
    }
View Full Code Here

  // TODO have CommonDefinition fetch attributes upwards,
  // instead of the other way around
  protected void applyBasicAttributes(AttribBasic attribute, INonScopedContainer block) {
    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) {
View Full Code Here

  }
 
  protected void applyProtectionAttributes(EProtection protection, INonScopedContainer block) {
    Iterator<? extends IASTNode> iter = block.getMembersIterator();
    while(iter.hasNext()) {
      IASTNode descendantNode = iter.next();
     
      if(anotherProtectionAttribPresent(descendantNode)) {
        continue; // Do not descend, other attrib takes precedence
      }
      if(descendantNode instanceof CommonDefinition) {
View Full Code Here

  }
 
  @Override
  public boolean hasChildren(Object element) {
    if(element instanceof Module || isSignificantDeclarationBlock(element)) {
      IASTNode node = (IASTNode) element;
      return filterElements(node.getChildren()).length > 0;
    } else {
      return false;
    }
  }
View Full Code Here

TOP

Related Classes of dtool.ast.IASTNode

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.