@Override public void setInitializer(IASTInitializer initializer) { assertNotFrozen(); this.initializer = initializer; if (initializer != null) { initializer.setParent(this); initializer.setPropertyInParent(INITIALIZER); } }
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); } }
protected <T extends CPPASTDeclarator> T copy(T copy, CopyStyle style) { copy.setName(name == null ? null : name.copy(style)); copy.setInitializer(initializer == null ? null : initializer.copy(style)); copy.setNestedDeclarator(nested == null ? null : nested.copy(style)); ((CPPASTDeclarator) copy).isPackExpansion = isPackExpansion; for (IASTPointerOperator pointer : getPointerOperators()) { copy.addPointerOperator(pointer.copy(style)); } return super.copy(copy, style); }
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); } }