Пример #1
0
        private bool MoveNext(LexemeCodes code)
        {
            if (currentIndex == lexemes.Count)
            {
                throw new InvalidOperationException($"I need moaar, give me {code}");
            }

            if (CurrentLexeme.Code == (int)code)
            {
                currentIndex++;
                return(true);
            }

            return(false);
        }
Пример #2
0
 public bool Is(LexemeCodes code)
 {
     return((LexemeCodes)Code == code);
 }