X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fdoc.cs;h=19340bf6c1e3c6241c6e05ef14d2efc8a46208df;hb=2a8b79ec1d4685a5d62630e2ce930a3df6c387a4;hp=40edc1c9294ca935abf40eb4d73351af6fb9308e;hpb=ea6c852fadb1ad26d63c69373f884000fca385ad;p=mono.git diff --git a/mcs/mcs/doc.cs b/mcs/mcs/doc.cs index 40edc1c9294..19340bf6c1e 100644 --- a/mcs/mcs/doc.cs +++ b/mcs/mcs/doc.cs @@ -32,6 +32,7 @@ namespace Mono.CSharp readonly XmlDocument XmlDocumentation; readonly ModuleContainer module; + readonly ModuleContainer doc_module; // // The output for XML documentation. @@ -48,6 +49,9 @@ namespace Mono.CSharp public DocumentationBuilder (ModuleContainer module) { + doc_module = new ModuleContainer (module.Compiler); + doc_module.DocumentationBuilder = this; + this.module = module; XmlDocumentation = new XmlDocument (); XmlDocumentation.PreserveWhitespace = false; @@ -322,13 +326,10 @@ namespace Mono.CSharp var s = new MemoryStream (encoding.GetBytes (cref)); SeekableStreamReader seekable = new SeekableStreamReader (s, encoding); - var source_file = new CompilationSourceFile ("{documentation}", "", 1); - var doc_module = new ModuleContainer (module.Compiler); - doc_module.DocumentationBuilder = this; - source_file.NamespaceContainer = new NamespaceContainer (null, doc_module, null, source_file); + var source_file = new CompilationSourceFile (doc_module); + var report = new Report (doc_module.Compiler, new NullReportPrinter ()); - Report parse_report = new Report (new NullReportPrinter ()); - var parser = new CSharpParser (seekable, source_file, parse_report); + var parser = new CSharpParser (seekable, source_file, report); ParsedParameters = null; ParsedName = null; ParsedBuiltinType = null; @@ -336,7 +337,7 @@ namespace Mono.CSharp parser.Lexer.putback_char = Tokenizer.DocumentationXref; parser.Lexer.parsing_generic_declaration_doc = true; parser.parse (); - if (parse_report.Errors > 0) { + if (report.Errors > 0) { Report.Warning (1584, 1, mc.Location, "XML comment on `{0}' has syntactically incorrect cref attribute `{1}'", mc.GetSignatureForError (), cref);