Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape the multiline-comment end sequence '*/' in doc comments #3

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

mjoerussell
Copy link

This fixes an issue I encountered when adding EBNF documentation to the TerminalKind and NonterminalKind enums. The TerminalKind variants "MultilineComment" and "MultiLineNatSpecComment" both print out the sequence "*/", but this sequence ends the current doc comment and then causes the rest of the file to be parsed incorrectly. By escaping this sequence we avoid this issue, but the generated docs still show the correct string.

The escaped sequence looks like this: '*/'.

…doc comment. The escaped sequence looks like this: '*\/'.
@OmarTawfik OmarTawfik added this pull request to the merge queue Nov 28, 2024
Merged via the queue into nomic-enhancements-release with commit 51b184c Nov 28, 2024
@OmarTawfik OmarTawfik deleted the feature/escape-multiline branch November 28, 2024 11:04
github-merge-queue bot pushed a commit to NomicFoundation/slang that referenced this pull request Dec 12, 2024
…#1169)

When generating documentation for `TerminalKind` and `NonterminalKind`,
generate the EBNF grammar for the current variant and include that in
the final output. This affects the Wit output and Rust output (using
templates `cst.wit.jinja2` and `(terminal|nonterminal)_kind.rs.jinja2`).

* [x] Depends on #1157
* [x] Depends on NomicFoundation/jco#3

Closes #1165
github-merge-queue bot pushed a commit to NomicFoundation/slang that referenced this pull request Dec 12, 2024
…#1169)

When generating documentation for `TerminalKind` and `NonterminalKind`,
generate the EBNF grammar for the current variant and include that in
the final output. This affects the Wit output and Rust output (using
templates `cst.wit.jinja2` and `(terminal|nonterminal)_kind.rs.jinja2`).

* [x] Depends on #1157
* [x] Depends on NomicFoundation/jco#3

Closes #1165
github-merge-queue bot pushed a commit to NomicFoundation/slang that referenced this pull request Dec 12, 2024
…#1169)

When generating documentation for `TerminalKind` and `NonterminalKind`,
generate the EBNF grammar for the current variant and include that in
the final output. This affects the Wit output and Rust output (using
templates `cst.wit.jinja2` and `(terminal|nonterminal)_kind.rs.jinja2`).

* [x] Depends on #1157
* [x] Depends on NomicFoundation/jco#3

Closes #1165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants