authorgravatar for pfg@pfg.pwpfg <pfg@pfg.pw> 2021-10-02 16:54:05-04:00
committergravatar for pfg@pfg.pwpfg <pfg@pfg.pw> 2021-10-02 16:54:05-04:00
log224423ac27876cb6f4d05edd30188fcca07e5b68
tree021c8a9af12cfa128af438ab88a68f701adfa406
parentcfbbd970754eb39345eeb6dd3423b128df5c359c

fix grammer file name and .y file type


2 files changed, 13 insertions(+), 6 deletions(-)

doc/docgen.zig+3-3
...@@ -313,7 +313,7 @@ const SyntaxBlock = struct {...@@ -313,7 +313,7 @@ const SyntaxBlock = struct {
313 const SourceType = enum {313 const SourceType = enum {
314 zig,314 zig,
315 c,315 c,
316 peg,316 y,
317 javascript,317 javascript,
318 };318 };
319};319};
...@@ -667,8 +667,8 @@ fn genToc(allocator: *Allocator, tokenizer: *Tokenizer) !Toc {...@@ -667,8 +667,8 @@ fn genToc(allocator: *Allocator, tokenizer: *Tokenizer) !Toc {
667 source_type = SyntaxBlock.SourceType.zig;667 source_type = SyntaxBlock.SourceType.zig;
668 } else if (mem.eql(u8, source_type_str, "c")) {668 } else if (mem.eql(u8, source_type_str, "c")) {
669 source_type = SyntaxBlock.SourceType.c;669 source_type = SyntaxBlock.SourceType.c;
670 } else if (mem.eql(u8, source_type_str, "peg")) {670 } else if (mem.eql(u8, source_type_str, "y")) {
671 source_type = SyntaxBlock.SourceType.c;671 source_type = SyntaxBlock.SourceType.y;
672 } else if (mem.eql(u8, source_type_str, "javascript")) {672 } else if (mem.eql(u8, source_type_str, "javascript")) {
673 source_type = SyntaxBlock.SourceType.javascript;673 source_type = SyntaxBlock.SourceType.javascript;
674 } else {674 } else {
doc/langref.html.in+10-3
...@@ -170,6 +170,9 @@...@@ -170,6 +170,9 @@
170 background: #a8b9cc;170 background: #a8b9cc;
171 color: #000;171 color: #000;
172 }172 }
173 figcaption.y-cap {
174 background: #fcdba5;
175 }
173 figcaption.javascript-cap {176 figcaption.javascript-cap {
174 background: #365d95;177 background: #365d95;
175 color: #fff;178 color: #fff;
...@@ -199,7 +202,7 @@...@@ -199,7 +202,7 @@
199 pre {202 pre {
200 counter-reset: line;203 counter-reset: line;
201 }204 }
202 pre span.line:before {205 pre .line:before {
203 counter-increment: line;206 counter-increment: line;
204 content: counter(line);207 content: counter(line);
205 display: inline-block;208 display: inline-block;
...@@ -211,7 +214,7 @@...@@ -211,7 +214,7 @@
211 th pre code {214 th pre code {
212 background: none;215 background: none;
213 }216 }
214 th span.line:before {217 th .line:before {
215 display: none;218 display: none;
216 }219 }
217220
...@@ -288,6 +291,10 @@...@@ -288,6 +291,10 @@
288 background-color: #b27306;291 background-color: #b27306;
289 color: #000;292 color: #000;
290 }293 }
294 figcaption.y-cap {
295 background-color: #b27306;
296 color: #000;
297 }
291 figcaption.shell-cap {298 figcaption.shell-cap {
292 background: #2a2a2a;299 background: #2a2a2a;
293 color: #fff;300 color: #fff;
...@@ -11650,7 +11657,7 @@ fn readU32Be() u32 {}...@@ -11650,7 +11657,7 @@ fn readU32Be() u32 {}
11650 {#header_close#}11657 {#header_close#}
1165111658
11652 {#header_open|Grammar#}11659 {#header_open|Grammar#}
11653 {#syntax_block|peg|grammar.y#}Root <- skip container_doc_comment? ContainerMembers eof11660 {#syntax_block|y|grammar.y#}Root <- skip container_doc_comment? ContainerMembers eof
1165411661
11655# *** Top level ***11662# *** Top level ***
11656ContainerMembers <- ContainerDeclarations (ContainerField COMMA)* (ContainerField / ContainerDeclarations)11663ContainerMembers <- ContainerDeclarations (ContainerField COMMA)* (ContainerField / ContainerDeclarations)