Antlr4.Semantics.RuleCollector.DiscoverLexerRule C# (CSharp) 메소드

DiscoverLexerRule() 공개 메소드

public DiscoverLexerRule ( RuleAST rule, GrammarAST ID, IList modifiers, GrammarAST block ) : void
rule Antlr4.Tool.Ast.RuleAST
ID Antlr4.Tool.Ast.GrammarAST
modifiers IList
block Antlr4.Tool.Ast.GrammarAST
리턴 void
        public override void DiscoverLexerRule(RuleAST rule, GrammarAST ID, IList<GrammarAST> modifiers,
                                      GrammarAST block)
        {
            int numAlts = block.ChildCount;
            Rule r = new Rule(g, ID.Text, rule, numAlts);
            r.mode = currentModeName;
            if (modifiers.Count > 0)
                r.modifiers = modifiers;
            rules[r.name] = r;
        }
    }