Ejemplo n.º 1
0
 public ILexemeFactory Get(LexerRuleType lexerRuleType)
 {
     if (!_registry.TryGetValue(lexerRuleType.GetHashCode(), out ILexemeFactory lexemeFactory))
     {
         return(null);
     }
     return(lexemeFactory);
 }
Ejemplo n.º 2
0
        public ILexemeFactory Get(LexerRuleType lexerRuleType)
        {
            ILexemeFactory lexemeFactory = null;

            if (!_registry.TryGetValue(lexerRuleType, out lexemeFactory))
            {
                return(null);
            }
            return(lexemeFactory);
        }
Ejemplo n.º 3
0
 private static int ComputeHashCode(LexerRuleType dfaLexerRuleType, TokenType tokenType)
 {
     return(HashCode.Compute(
                dfaLexerRuleType.GetHashCode(),
                tokenType.GetHashCode()));
 }