Make 'line_comment' more explicit about newlines
Because of the way regular expressions work, they were already bounded at newlines here, but explicit is better than implicit :-).
This commit is contained in:
parent
73b0797891
commit
be1e3f07d3
3 changed files with 19 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ module.exports = grammar({
|
|||
$.module,
|
||||
),
|
||||
|
||||
line_comment: (_) => seq("//", /.*/),
|
||||
line_comment: (_) => seq("//", /[^\n]*/),
|
||||
|
||||
block_comment: (_) => seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, '/'),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue