public override IList<SrcOp> Wildcard(GrammarAST ast, GrammarAST labelAST)
{
Wildcard wild = new Wildcard(this, ast);
// TODO: dup with tokenRef
if (labelAST != null)
{
string label = labelAST.Text;
Decl d = GetTokenLabelDecl(label);
wild.labels.Add(d);
GetCurrentRuleFunction().AddContextDecl(ast.GetAltLabel(), d);
if (labelAST.Parent.Type == ANTLRParser.PLUS_ASSIGN)
{
TokenListDecl l = GetTokenListLabelDecl(label);
GetCurrentRuleFunction().AddContextDecl(ast.GetAltLabel(), l);
}
}
if (controller.NeedsImplicitLabel(ast, wild))
DefineImplicitLabel(ast, wild);
AddToLabelList listLabelOp = GetAddToListOpIfListLabelPresent(wild, labelAST);
return List(wild, listLabelOp);
}