Syntax rule for non-doc line comments
Nobody has claimed this yet.
- Dominant language
- reStructuredText
- Stars
- 497
- Forks
- 41
- Avg merge
- 3h 52m
- Merged PRs (30d)
- 4
Description
§2.5 (fls_q8l2jza7d9xa) provides the following syntax rule for a non-doc line comment:
LineComment ::=
//
| // (~[! /] | //) ~[\n]*
The ~[! /] expression is there to make sure this rule doesn't match an outer line doc.
But that expressions matches too broadly: it accepts LF, which it shouldn't (the notation ~[X Y] is defined in §1.1.4:14 (fls_blvsfqeevosr) and means to match a single character other than X or Y).
That means that this syntax rule says, for example, that the following input
is a single LineComment:
//
x = 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with §2.5 (fls_q8l2jza7d9xa) and compare the LineComment rule with the character-matching notation defined in §1.1.4:14 (fls_blvsfqeevosr). Correct the rule so a line-feed cannot be consumed as part of a non-doc line comment, and verify that the shown // followed by x = 1 input is no longer one LineComment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100