Antlr3.Tool.Grammar.SetSynPredGateIfNotAlready C# (CSharp) Method

SetSynPredGateIfNotAlready() public method

public SetSynPredGateIfNotAlready ( Antlr4.StringTemplate.Template gateST ) : void
gateST Antlr4.StringTemplate.Template
return void
        public virtual void SetSynPredGateIfNotAlready( StringTemplate gateST )
        {
            string scope = GetDefaultActionScope( type );
            IDictionary<string, object> actionsForGrammarScope;
            Actions.TryGetValue(scope, out actionsForGrammarScope);
            // if no synpredgate action set by user then set
            if ( actionsForGrammarScope == null || !actionsForGrammarScope.ContainsKey( Grammar.SynpredGateActionName ) )
            {
                if ( actionsForGrammarScope == null )
                {
                    actionsForGrammarScope = new Dictionary<string, object>();
                    Actions[scope] = actionsForGrammarScope;
                }
                actionsForGrammarScope[Grammar.SynpredGateActionName] = gateST;
            }
        }
Grammar