Exemple #1
0
        public PreprocessorKeywords(NameTable symbolTable)
        {
            keywords = new Hashtable();

            for (PreprocessorTokenType token = 0; token < PreprocessorTokenType.Identifier; token += 1)
            {
                keywords.Add(symbolTable.Add(PreprocessorToken.TypeString(token)), token);
            }
        }
Exemple #2
0
        private PreprocessorToken Eat(PreprocessorTokenType type)
        {
            if (PeekType() != type)
            {
                ReportFormattedError(PreprocessorError.TokenExpected, PreprocessorToken.TypeString(type));

                return(null);
            }

            return(NextToken());
        }