Beispiel #1
0
        public virtual object GetBlockOption( GrammarAST blockAST, string key )
        {
            string v = (string)blockAST.GetBlockOption( key );
            if ( v != null )
            {
                return v;
            }

            object result;
            if (type == GrammarType.Lexer)
                defaultLexerBlockOptions.TryGetValue(key, out result);
            else
                defaultBlockOptions.TryGetValue(key, out result);

            return result;
        }
Beispiel #2
0
 public virtual object GetBlockOption( GrammarAST blockAST, string key )
 {
     string v = (string)blockAST.GetBlockOption( key );
     if ( v != null )
     {
         return v;
     }
     if ( type == GrammarType.Lexer )
     {
         return defaultLexerBlockOptions.get( key );
     }
     return defaultBlockOptions.get( key );
 }