protected void writeDefaultDeclarator(IASTDeclarator declarator) {
   IASTPointerOperator[] pointOps = declarator.getPointerOperators();
   writePointerOperators(declarator, pointOps);
   IASTName name = declarator.getName();
   name.accept(visitor);
   writeNestedDeclarator(declarator);
   IASTInitializer init = getInitializer(declarator);
   if (init != null) {
     init.accept(visitor);
   }
 }
 private void writeFieldDeclarator(IASTFieldDeclarator fieldDecl) {
   IASTPointerOperator[] pointOps = fieldDecl.getPointerOperators();
   writePointerOperators(fieldDecl, pointOps);
   fieldDecl.getName().accept(visitor);
   scribe.printSpace();
   scribe.print(':');
   scribe.printSpace();
   fieldDecl.getBitFieldSize().accept(visitor);
   IASTInitializer initializer = getInitializer(fieldDecl);
   if (initializer != null) {
     initializer.accept(visitor);
   }
 }
  private void writeArrayDeclarator(IASTArrayDeclarator arrDecl) {
    IASTPointerOperator[] pointOps = arrDecl.getPointerOperators();
    writePointerOperators(arrDecl, pointOps);
    IASTName name = arrDecl.getName();
    name.accept(visitor);

    writeNestedDeclarator(arrDecl);

    IASTArrayModifier[] arrMods = arrDecl.getArrayModifiers();
    writeArrayModifiers(arrDecl, arrMods);
    IASTInitializer initializer = getInitializer(arrDecl);
    if (initializer != null) {
      initializer.accept(visitor);
    }
  }
Beispiel #4
0
 protected boolean postAccept(ASTVisitor action) {
   return initializer == null || initializer.accept(action);
 }
 private void writeInitializer(IASTStandardFunctionDeclarator funcDec) {
   IASTInitializer init = getInitializer(funcDec);
   if (init != null) {
     init.accept(visitor);
   }
 }