Selaa lähdekoodia

fix: comments can have multiple delimiting backslashes

pull/135/head
Amaan Qureshi 3 vuotta sitten
vanhempi
commit
16456ce9a1
No known key found for this signature in database GPG Key ID: E67890ADC4227273
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. +1
    -1
      grammar.js

+ 1
- 1
grammar.js Näytä tiedosto

@ -1002,7 +1002,7 @@ module.exports = grammar({
// http://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment/36328890#36328890
comment: $ => token(choice(
seq('//', /(\\(.|\r?\n)|[^\\\n])*/),
seq('//', /(\\+(.|\r?\n)|[^\\\n])*/),
seq(
'/*',
/[^*]*\*+([^/*][^*]*\*+)*/,

Ladataan…
Peruuta
Tallenna