support using-enum-declaration

pull/502/head
John Drouhard 2022-10-19 20:38:44 +07:00
parent d5e90fba89
commit 5ead1e26c6
4 changed files with 52313 additions and 52295 deletions

@ -652,7 +652,7 @@ module.exports = grammar(C, {
using_declaration: $ => seq(
'using',
optional('namespace'),
optional(choice('namespace', 'enum')),
choice(
$.identifier,
$.qualified_identifier

13
src/grammar.json vendored

@ -9930,8 +9930,17 @@
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "namespace"
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "namespace"
},
{
"type": "STRING",
"value": "enum"
}
]
},
{
"type": "BLANK"

104591
src/parser.c vendored

File diff suppressed because it is too large Load Diff

@ -81,6 +81,7 @@ using c::d;
using ::e::f::g;
using h = i::j;
using namespace std;
using enum Foo;
template <typename T>
using a = typename b<T>::c;
@ -102,6 +103,7 @@ using a = typename b<T>::c;
(type_identifier)
(type_descriptor (qualified_identifier (namespace_identifier) (type_identifier))))
(using_declaration (identifier))
(using_declaration (identifier))
(template_declaration
(template_parameter_list
(type_parameter_declaration (type_identifier)))