private static ParseResult Match_Eol(InputStream input) { return(ParseBuilder.FirstOf( ParseBuilder.Match("\r\n"), ParseBuilder.Match('\r'), ParseBuilder.Match('\n'))(input)); }
private static ParseResult Match_Space(InputStream input) { return(ParseBuilder.FirstOf( ParseBuilder.Match(' '), ParseBuilder.Match('\t'), Match_Eol)(input)); }
private static ParseResult Match_GenericTypeParameter(InputStream input) { return(ParseBuilder.FirstOf( ParseBuilder.WithAction(Match_UnqualifiedName, r => { var result = new TypeNameInfo(); InitializeTypeNameInfo((ParsedUnqualifiedName)r.ResultData, result); return new ParseResult(r.MatchedString, result); }), ParseBuilder.WithAction( ParseBuilder.Sequence(Match_LeftBracket, Match_TypeName, Match_RightBracket), r => new SequenceResult(r)[1]))( input)); }
private static ParseResult Match_IdAlphanumeric(InputStream input) { return(ParseBuilder.FirstOf(Match_QuotedChar, ParseBuilder.Match(ch => char.IsLetterOrDigit(ch)))(input)); }
private static ParseResult Match_IdContinuation(InputStream input) { return(ParseBuilder.FirstOf(Match_IdNonAlpha, Match_IdAlphanumeric)(input)); }
private static ParseResult Match_IdStart(InputStream input) { return(ParseBuilder.FirstOf(Match_IdNonAlpha, Match_IdAlpha)(input)); }
private static ParseResult Match_AssemblyNameChar(InputStream input) { return(ParseBuilder.FirstOf(Match_QuotedChar, ParseBuilder.Match(ch => !"^/\\:?\"<>|,[]".Contains(ch)))(input)); }
private static ParseResult Match_AssemblyNamePart(InputStream input) { return(ParseBuilder.FirstOf(Match_Culture, Match_Version, Match_PublicKey, Match_PublicKeyToken)(input)); }
private static ParseResult Match_OpenGeneric(InputStream input) { return(ParseBuilder.FirstOf(Match_CLRSyntax, Match_EmptyBrackets)(input)); }
private static ParseResult Match_GenericParameters(InputStream input) { return(ParseBuilder.FirstOf(Match_ClosedGeneric, Match_OpenGeneric)(input)); }