diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2022-01-18 11:03:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 11:03:41 +0000 |
| commit | 841c428273d0b1e0a9f78ac8c0726daab69d7e35 (patch) | |
| tree | c543fd68d87efce2a36b598e8d376c6f28b48f3c /src/parser.cpp | |
| parent | 686dbb4421824f17164443b2538b587e91d400a5 (diff) | |
| parent | 6b830f42b6a8baec77ee0c8d12333ca2ad4a296f (diff) | |
Merge pull request #1433 from odin-lang/html-docs-printer
Initial Work on HTML Docs Printer
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 5bf43cee9..7e7146244 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -5412,6 +5412,15 @@ bool parse_file(Parser *p, AstFile *f) { if (f->package_token.kind != Token_package) { return false; } + if (docs != nullptr) { + TokenPos end = token_pos_end(docs->list[docs->list.count-1]); + if (end.line == f->package_token.pos.line || end.line+1 == f->package_token.pos.line) { + // Okay + } else { + docs = nullptr; + } + } + Token package_name = expect_token_after(f, Token_Ident, "package"); if (package_name.kind == Token_Ident) { if (package_name.string == "_") { |