Add 'default' alias

This makes it appear in the tree as a named node.
This commit is contained in:
Bruno BELANYI 2024-04-09 13:08:02 +01:00
parent e0aa749e1b
commit 9049b4f4b9
6 changed files with 16 additions and 7 deletions

7
src/grammar.json generated
View file

@ -682,7 +682,12 @@
"type": "FIELD",
"name": "pattern",
"content": {
"type": "STRING",
"type": "ALIAS",
"content": {
"type": "STRING",
"value": "default"
},
"named": true,
"value": "default"
}
},

4
src/node-types.json generated
View file

@ -187,7 +187,7 @@
"types": [
{
"type": "default",
"named": false
"named": true
}
]
},
@ -658,7 +658,7 @@
},
{
"type": "default",
"named": false
"named": true
},
{
"type": "escape_sequence",

2
src/parser.c generated
View file

@ -338,7 +338,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
},
[anon_sym_default] = {
.visible = true,
.named = false,
.named = true,
},
[anon_sym_unset] = {
.visible = true,