Package org.eclipse.cdt.core.dom.ast

Examples of org.eclipse.cdt.core.dom.ast.IASTDeclarator


    declarationWriter = new ModifiedASTDeclarationWriter(scribe, this, stack, commentMap);
  }

  @Override
  protected IASTDeclarator getParameterDeclarator(final IASTParameterDeclaration parameterDeclaration) {
    IASTDeclarator newDecl = parameterDeclaration.getDeclarator();
    if (stack.getModifiedNodes().contains(newDecl)) {
      for (final ASTModification currentModification : stack.getModificationsForNode(newDecl)) {
        if ((currentModification.getKind() == ASTModification.ModificationKind.REPLACE) && (currentModification.getTargetNode() == parameterDeclaration)) {
          newDecl = (IASTDeclarator) currentModification.getNewNode();
        }
View Full Code Here


        visitor.setSpaceNeededBeforeName(true);
      }
    } else {
      visitor.setSpaceNeededBeforeName(true);
    }
    final IASTDeclarator declarator = ASTQueries.findOutermostDeclarator(funcDef.getDeclarator());
    declarator.accept(visitor);

    if (funcDef instanceof ICPPASTFunctionWithTryBlock) {
      scribe.newLine();
      scribe.print(Keywords.TRY);
    }
View Full Code Here

  @Override
  public int visit(final IASTParameterDeclaration parameterDeclaration) {
    writeLeadingComments(parameterDeclaration);
    if (!macroHandler.checkisMacroExpansionNode(parameterDeclaration)) {
      parameterDeclaration.getDeclSpecifier().accept(this);
      final IASTDeclarator declarator = getParameterDeclarator(parameterDeclaration);

      spaceNeededBeforeName = true;
      declarator.accept(this);
    }
    return ASTVisitor.PROCESS_SKIP;
  }
View Full Code Here

    writeParameterDeclarations(funcDec, paraDecls);
    scribe.print(')');
  }

  private void writeNestedDeclarator(final IASTDeclarator funcDec) {
    final IASTDeclarator nestedDeclarator = funcDec.getNestedDeclarator();
    if (nestedDeclarator != null) {
      if (visitor.isSpaceNeededBeforeName()) {
        scribe.printSpace();
        visitor.setSpaceNeededBeforeName(false);
      }
      scribe.print('(');
      nestedDeclarator.accept(visitor);
      scribe.print(')');
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.cdt.core.dom.ast.IASTDeclarator

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.