Antlr4.Codegen.Model.ElementFrequenciesVisitor.ExitSubrule C# (CSharp) Метод

ExitSubrule() защищенный Метод

protected ExitSubrule ( GrammarAST tree ) : void
tree GrammarAST
Результат void
        protected override void ExitSubrule(GrammarAST tree)
        {
            if (tree.Type == CLOSURE || tree.Type == POSITIVE_CLOSURE)
            {
                foreach (KeyValuePair<string, StrongBox<int>> entry in frequencies.Peek())
                {
                    entry.Value.Value = 2;
                }
            }

            if (tree.Type == CLOSURE)
            {
                // Everything inside a closure is optional, so the minimum
                // number of occurrences for all elements is 0.
                minFrequencies.Peek().Clear();
            }
        }