/// <summary> /// Reads a <see cref="CodeCompileUnit"/> from the specified <see cref="TextReader"/> /// </summary> /// <param name="reader">The reader to read from</param> /// <returns>A <see cref="CodeCompileUnit"/> representing the parsed code</returns> public static CodeCompileUnit ReadCompileUnitFrom(TextReader reader) => ParseCompileUnit(TextReaderEnumerable.FromReader(reader));
/// <summary> /// Reads a <see cref="CodeTypeDeclaration"/> from the specified <see cref="TextReader"/> /// </summary> /// <param name="reader">The reader to read from</param> /// <returns>A <see cref="CodeTypeDeclaration"/> representing the parsed code</returns> public static CodeTypeDeclaration ReadTypeFrom(TextReader reader) => ParseType(TextReaderEnumerable.FromReader(reader));
/// <summary> /// Reads a <see cref="CodeNamespace"/> from the specified <see cref="TextReader"/> /// </summary> /// <param name="reader">The reader to read from</param> /// <returns>A <see cref="CodeNamespace"/> representing the parsed code</returns> public static CodeNamespace ReadNamespaceFrom(TextReader reader) => ParseNamespace(TextReaderEnumerable.FromReader(reader));
/// <summary> /// Reads a <see cref="CodeTypeMember"/> from the specified <see cref="TextReader"/> /// </summary> /// <param name="reader">The reader to read from</param> /// <returns>A <see cref="CodeTypeMember"/> representing the parsed code</returns> public static CodeTypeMember ReadMemberFrom(TextReader reader) => ParseMember(TextReaderEnumerable.FromReader(reader));
/// <summary> /// Reads a <see cref="CodeStatement"/> from the specified <see cref="TextReader"/> /// </summary> /// <param name="reader">The reader to read from</param> /// <param name="includeComments">True to include comments, or false to skip them</param> /// <returns>A <see cref="CodeStatement"/> representing the parsed code</returns> public static CodeStatement ReadStatementFrom(TextReader reader, bool includeComments = false) => ParseStatement(TextReaderEnumerable.FromReader(reader), includeComments);
/// <summary> /// Reads a <see cref="CodeTypeReference"/> from the specified <see cref="TextReader"/> /// </summary> /// <param name="reader">The reader to read from</param> /// <returns>A <see cref="CodeTypeReference"/> representing the parsed code</returns> public static CodeTypeReference ReadTypeRefFrom(TextReader reader) => ParseTypeRef(TextReaderEnumerable.FromReader(reader));