Skip to content

Commit

Permalink
autodoc: Added line_comment tokens to ziglexer.js tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
der-teufel-programming authored and kristoff-it committed Aug 3, 2023
1 parent c4e62be commit b317ca4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@
}

.zig_doc_comment,
.zig_container_doc_comment {
.zig_container_doc_comment,
.zig_line_comment {
color: #545454;
font-style: italic;
}
Expand Down
7 changes: 4 additions & 3 deletions lib/docs/ziglexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const Tag = {
number_literal: "number_literal",
doc_comment: "doc_comment",
container_doc_comment: "container_doc_comment",
line_comment: "line_comment",
invalid_periodasterisks: "invalid_periodasterisks",
bang: "bang",
pipe: "pipe",
Expand Down Expand Up @@ -1699,9 +1700,9 @@ function InnerTokenizer(raw_source) {
return result;
}
case '\n': {
state = State.start;
result.loc.start = this.index + 1;
break;
result.tag = Tag.line_comment;
result.loc.end = this.index;
return result;
}
case '\t': break;
//TODO: PORT
Expand Down

0 comments on commit b317ca4

Please # to comment.