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

NeedsImplicitLabel() public method

public NeedsImplicitLabel ( GrammarAST ID, LabeledOp op ) : bool
ID Antlr4.Tool.Ast.GrammarAST
op LabeledOp
return bool
        public override bool NeedsImplicitLabel(GrammarAST ID, LabeledOp op)
        {
            Alternative currentOuterMostAlt = GetCurrentOuterMostAlt();
            bool actionRefsAsToken = currentOuterMostAlt.tokenRefsInActions.ContainsKey(ID.Text);
            bool actionRefsAsRule = currentOuterMostAlt.ruleRefsInActions.ContainsKey(ID.Text);
            return op.GetLabels().Count == 0 && (actionRefsAsToken || actionRefsAsRule);
        }