parseCallsite(child);
break;
default:
- childTypeError(child);
+ throw childTypeError(child);
}
}
if (traceNode == null) {
parseCallsite(child);
break;
default:
- childTypeError(child);
+ throw childTypeError(child);
}
}
parseEvents(events, !Iterables.isEmpty(fTrace.getStreams()));
parseTraceDeclaration(child);
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
parseStreamDeclaration(child, stream);
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
parseEventDeclaration(child, event);
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
parseTypeSpecifierList(child, null);
break;
default:
- childTypeError(child);
+ throw childTypeError(child);
}
}
}
alias = child;
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
typeDeclaratorList = child;
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
typeDeclaratorList = child;
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
throw new ParseException("Identifier (" + child.getText() //$NON-NLS-1$
+ ") not expected in the typealias target"); //$NON-NLS-1$
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
}
lengths.add(child);
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
declaration = new SequenceDeclaration(lengthName,
declaration);
} else {
- childTypeError(first);
+ throw childTypeError(first);
}
}
}
declaration = parseTypeDeclaration(typeSpecifierList, pointerList);
break;
default:
- childTypeError(firstChild);
+ throw childTypeError(firstChild);
}
return declaration;
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
int size = mantissa + exponent;
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
break;
}
default:
- childTypeError(child);
-
- break;
+ throw childTypeError(child);
}
}
parseStructDeclaration(declarationNode, structDeclaration);
break;
default:
- childTypeError(declarationNode);
- break;
+ throw childTypeError(declarationNode);
}
}
popScope();
break;
}
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
low = parseUnaryInteger((CommonTree) child.getChild(0));
high = parseUnaryInteger((CommonTree) child.getChild(1));
} else {
- childTypeError(child);
+ throw childTypeError(child);
}
}
break;
default:
- childTypeError(child);
- break;
+ throw childTypeError(child);
}
}
parseVariantDeclaration(declarationNode, variantDeclaration);
break;
default:
- childTypeError(declarationNode);
- break;
+ throw childTypeError(declarationNode);
}
}
case CTFParser.STRING:
throw new ParseException("CTF type found in createTypeSpecifierString"); //$NON-NLS-1$
default:
- childTypeError(typeSpecifier);
- break;
+ throw childTypeError(typeSpecifier);
}
}
*
* @param child
* The invalid child node.
- * @throws ParseException
+ * @return ParseException with details
*/
- private static void childTypeError(CommonTree child) throws ParseException {
+ private static ParseException childTypeError(CommonTree child) {
CommonTree parent = (CommonTree) child.getParent();
String error = "Parent " + CTFParser.tokenNames[parent.getType()] //$NON-NLS-1$
+ " can't have a child of type " //$NON-NLS-1$
+ CTFParser.tokenNames[child.getType()] + "."; //$NON-NLS-1$
- throw new ParseException(error);
+ return new ParseException(error);
}
// ------------------------------------------------------------------------