ソースを参照

fix: allow preproc calls in enumerator list items

pull/189/head
Amaan Qureshi 2年前
コミット
34f4c7e751
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: E67890ADC4227273
4個のファイルの変更51627行の追加51587行の削除
  1. +2
    -0
      grammar.js
  2. +17
    -0
      src/grammar.json
  3. +4
    -0
      src/node-types.json
  4. +51604
    -51587
      src/parser.c

+ 2
- 0
grammar.js ファイルの表示

@ -624,12 +624,14 @@ module.exports = grammar({
seq($.enumerator, ','),
alias($.preproc_if_in_enumerator_list, $.preproc_if),
alias($.preproc_ifdef_in_enumerator_list, $.preproc_ifdef),
seq($.preproc_call, ','),
)),
optional(seq(
choice(
$.enumerator,
alias($.preproc_if_in_enumerator_list_no_comma, $.preproc_if),
alias($.preproc_ifdef_in_enumerator_list_no_comma, $.preproc_ifdef),
$.preproc_call,
),
)),
'}',

+ 17
- 0
src/grammar.json ファイルの表示

@ -4805,6 +4805,19 @@
},
"named": true,
"value": "preproc_ifdef"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "preproc_call"
},
{
"type": "STRING",
"value": ","
}
]
}
]
}
@ -4839,6 +4852,10 @@
},
"named": true,
"value": "preproc_ifdef"
},
{
"type": "SYMBOL",
"name": "preproc_call"
}
]
}

+ 4
- 0
src/node-types.json ファイルの表示

@ -1439,6 +1439,10 @@
"type": "enumerator",
"named": true
},
{
"type": "preproc_call",
"named": true
},
{
"type": "preproc_if",
"named": true

+ 51604
- 51587
src/parser.c
ファイル差分が大きすぎるため省略します
ファイルの表示


読み込み中…
キャンセル
保存