private static void DoFinal(ref RangeParserContext context) { if (!context.IsWhitespace) { context.Error("The range expression contains redundant content."); } }
private static void DoMaximumFinal(ref RangeParserContext context) { switch (context.Character) { case ')': context.Reset(State.Final); break; default: if (!context.IsWhitespace) { context.Error($"The invalid character is at {context.Index + 1} character."); } break; } }