Exemplo n.º 1
0
        internal void ReclassifyToken(IOilexerGrammarToken token, ReclassificationKind kind)
        {
            switch (kind)
            {
            case ReclassificationKind.Keyword:
            case ReclassificationKind.NativeMethod:
                reclassifications.Add(token, OilexerGrammarTokenType.Keyword);
                break;

            case ReclassificationKind.Error:
                reclassifications.Add(token, OilexerGrammarTokenType.Error);
                break;
            }
        }
Exemplo n.º 2
0
        internal void ReclassifyToken(OilexerGrammarTokens.IdentifierToken identifier, ReclassificationKind reclassificationKind)
        {
            if (reclassifications.ContainsKey(identifier))
            {
                return;
            }
            switch (reclassificationKind)
            {
            case ReclassificationKind.Keyword:
            case ReclassificationKind.NativeMethod:
                reclassifications.Add(identifier, OilexerGrammarTokenType.Keyword);
                break;

            default:
                break;
            }
        }