瀏覽代碼

fix: disallow `/` after `\S` to better handle comments in preproc_arg

pull/156/head
Amaan Qureshi 3 年之前
父節點
當前提交
5890e77d2d
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: E67890ADC4227273
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      grammar.js

+ 1
- 1
grammar.js 查看文件

@ -148,7 +148,7 @@ module.exports = grammar({
...preprocIf('', $ => $._block_item),
...preprocIf('_in_field_declaration_list', $ => $._field_declaration_list_item),
preproc_arg: _ => token(prec(-1, /\S(.|\\\r?\n)*/)),
preproc_arg: _ => token(prec(-1, /\S([^/\n]|\\\r?\n)*/)),
preproc_directive: _ => /#[ \t]*[a-zA-Z0-9]\w*/,
_preproc_expression: $ => choice(

Loading…
取消
儲存