Antlr4.Codegen.ParserFactory.Wildcard C# (CSharp) Method

Wildcard() public method

public Wildcard ( GrammarAST ast, GrammarAST labelAST ) : IList
ast Antlr4.Tool.Ast.GrammarAST
labelAST Antlr4.Tool.Ast.GrammarAST
return IList
        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);
        }