/// <summary> /// The PEG "dot" operator that matches and consumes one character. /// </summary> /// <param name="input">Input to the parser.</param> /// <returns>The parse result.</returns> public static ParseResult Any(InputStream input) { if (input.AtEnd) { return matchFailed; } var result = new ParseResult(input.CurrentChar.ToString()); input.Consume(1); return result; }
private static ParseResult MatchAndConsumeCurrentChar(InputStream input) { var result = new ParseResult(input.CurrentChar.ToString()); input.Consume(1); return result; }