diff options
| author | pfg <pfg@pfg.pw> | 2021-10-02 16:54:05 -0400 |
|---|---|---|
| committer | pfg <pfg@pfg.pw> | 2021-10-02 16:54:05 -0400 |
| commit | 224423ac27876cb6f4d05edd30188fcca07e5b68 (patch) | |
| tree | 021c8a9af12cfa128af438ab88a68f701adfa406 | |
| parent | cfbbd970754eb39345eeb6dd3423b128df5c359c (diff) | |
| download | zig-224423ac27876cb6f4d05edd30188fcca07e5b68.tar.gz zig-224423ac27876cb6f4d05edd30188fcca07e5b68.zip | |
fix grammer file name and .y file type
| -rw-r--r-- | doc/docgen.zig | 6 | ||||
| -rw-r--r-- | doc/langref.html.in | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/doc/docgen.zig b/doc/docgen.zig index 1e269f896e..66104d6dfd 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -313,7 +313,7 @@ const SyntaxBlock = struct { const SourceType = enum { zig, c, - peg, + y, javascript, }; }; @@ -667,8 +667,8 @@ fn genToc(allocator: *Allocator, tokenizer: *Tokenizer) !Toc { source_type = SyntaxBlock.SourceType.zig; } else if (mem.eql(u8, source_type_str, "c")) { source_type = SyntaxBlock.SourceType.c; - } else if (mem.eql(u8, source_type_str, "peg")) { - source_type = SyntaxBlock.SourceType.c; + } else if (mem.eql(u8, source_type_str, "y")) { + source_type = SyntaxBlock.SourceType.y; } else if (mem.eql(u8, source_type_str, "javascript")) { source_type = SyntaxBlock.SourceType.javascript; } else { diff --git a/doc/langref.html.in b/doc/langref.html.in index 1e5bab0d32..516e6775a9 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -170,6 +170,9 @@ background: #a8b9cc; color: #000; } + figcaption.y-cap { + background: #fcdba5; + } figcaption.javascript-cap { background: #365d95; color: #fff; @@ -199,7 +202,7 @@ pre { counter-reset: line; } - pre span.line:before { + pre .line:before { counter-increment: line; content: counter(line); display: inline-block; @@ -211,7 +214,7 @@ th pre code { background: none; } - th span.line:before { + th .line:before { display: none; } @@ -288,6 +291,10 @@ background-color: #b27306; color: #000; } + figcaption.y-cap { + background-color: #b27306; + color: #000; + } figcaption.shell-cap { background: #2a2a2a; color: #fff; @@ -11650,7 +11657,7 @@ fn readU32Be() u32 {} {#header_close#} {#header_open|Grammar#} - {#syntax_block|peg|grammar.y#}Root <- skip container_doc_comment? ContainerMembers eof + {#syntax_block|y|grammar.y#}Root <- skip container_doc_comment? ContainerMembers eof # *** Top level *** ContainerMembers <- ContainerDeclarations (ContainerField COMMA)* (ContainerField / ContainerDeclarations) |
