*
* @throws SyntaxException if the given text doesn't form a valid
* identifier.
*/
public static LinkedListTree parseTypeSpec(String value) {
AS3Parser parser = ASTUtils.parse(":" + value);
try {
LinkedListTree result = tree(parser.typeExpression());
ensureNoMoreInput(parser.getTokenStream(), value);
return result;
} catch (RecognitionException e) {
throw new SyntaxException("invalid type-spec "+ActionScriptFactory.str(value), e);
}
}