if (st instanceof DirectDeclarator) { DirectDeclarator decl = (DirectDeclarator) st; String name = decl.getName(); if (name == null) { continue; break; boolean hasNiceName = !decl.getName().endsWith("_") && !decl.getName().startsWith("_"); if (hasMoreThanOnePlainDecl || plainDecl != null && !(!plainHasNiceName && hasNiceName)) { hasMoreThanOnePlainDecl = true;
if (st instanceof DirectDeclarator) { DirectDeclarator decl = (DirectDeclarator) st; String name = decl.getName(); if (name == null) { continue; break; boolean hasNiceName = !decl.getName().endsWith("_") && !decl.getName().startsWith("_"); if (hasMoreThanOnePlainDecl || plainDecl != null && !(!plainHasNiceName && hasNiceName)) { hasMoreThanOnePlainDecl = true;
String name = decl.getName(); String changedName = "p" + StringUtils.capitalize(name); referencedElementsChangedNames.put(e.getId(), changedName);
String name = decl.getName(); String changedName = "p" + StringUtils.capitalize(name); referencedElementsChangedNames.put(e.getId(), changedName);
public void visitDeclarator(Declarator e) { if (e.isParenthesized()) { append('('); } implode(e.getModifiers(), " ").space(!e.getModifiers().isEmpty()); if (e instanceof DirectDeclarator) { append(((DirectDeclarator) e).getName()); } else if (e instanceof PointerDeclarator) { PointerDeclarator d = (PointerDeclarator) e; append(d.getPointerStyle(), d.getTarget()); } else if (e instanceof FunctionDeclarator) { FunctionDeclarator d = (FunctionDeclarator) e; append(d.getTarget(), '(').implode(d.getArgs(), ", ").append(")"); } else if (e instanceof ArrayDeclarator) { ArrayDeclarator d = (ArrayDeclarator) e; append(d.getTarget(), '[').implode(d.getDimensions(), "][").append("]"); } if (e.isParenthesized()) { append(')'); } if (e.getBits() >= 0) { append(":", e.getBits()); } if (e.getDefaultValue() != null) { append(" = ", e.getDefaultValue()); } }
public String resolveName() { return getName(); } public MutableByDeclarator mutateType(MutableByDeclarator type) {
@Override public void visitDirectDeclarator(final DirectDeclarator element) { super.visitDirectDeclarator(element); currentTable.defineVariable(element.getName(), element); }
public MutableByDeclarator mutateType(MutableByDeclarator type) { if (type == null) return null; type = type.clone(); if (type instanceof Function) { ((Function)type).setName(new Identifier.SimpleIdentifier(getName())); } ((Element)type).importDetails(this, false); return type; } @Override
@Override public void visitDirectDeclarator(final DirectDeclarator element) { super.visitDirectDeclarator(element); currentTable.defineVariable(element.getName(), element); }