public LexerInternalState(TextPosition nextPosition, TextPosition position, char32 previousChar, char32 c) { NextPosition = nextPosition; Position = position; PreviousChar = previousChar; CurrentChar = c; }
private void CheckCharacter(char32 c) { // The character 0xFFFD is the replacement character and we assume that something went wrong when reading the input if (!CharHelper.IsValidUnicodeScalarValue(c) || c == 0xFFFD) { AddError($"The character `{c}` is an invalid UTF8 character", _current.Position, _current.Position); } }