Przeglądaj źródła

fix: allow preproc calls in enumerator list items

pull/189/head
Amaan Qureshi 2 lat temu
rodzic
commit
34f4c7e751
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: E67890ADC4227273
4 zmienionych plików z 51627 dodań i 51587 usunięć
  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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

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

+ 51604
- 51587
src/parser.c
Plik diff jest za duży
Wyświetl plik


Ładowanie…
Anuluj
Zapisz