Sfoglia il codice sorgente

fix: comments can have multiple delimiting backslashes

pull/135/head
Amaan Qureshi 3 anni fa
parent
commit
16456ce9a1
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: E67890ADC4227273
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      grammar.js

+ 1
- 1
grammar.js Vedi File

@ -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(
'/*',
/[^*]*\*+([^/*][^*]*\*+)*/,

Caricamento…
Annulla
Salva