Replace '_typed_field' by more specific grammar

Instead of re-using a common rule, inline its definition and use
'_field_identifier' where appropriate.

This is useful for more accurate high-lighting.
This commit is contained in:
Bruno BELANYI 2022-06-03 10:40:14 +02:00
parent 5d37bf7bd1
commit da494122ea
5 changed files with 1715 additions and 1573 deletions

View file

@ -1161,8 +1161,29 @@
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_typed_field"
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "_field_identifier"
}
},
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "_type_identifier"
}
}
]
},
{
"type": "REPEAT",
@ -1174,8 +1195,29 @@
"value": ","
},
{
"type": "SYMBOL",
"name": "_typed_field"
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "_field_identifier"
}
},
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "_type_identifier"
}
}
]
}
]
}
@ -1193,31 +1235,6 @@
}
]
},
"_typed_field": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
}
]
},
"array_type": {
"type": "SEQ",
"members": [
@ -1337,8 +1354,29 @@
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_typed_field"
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "_type_identifier"
}
}
]
},
{
"type": "REPEAT",
@ -1350,8 +1388,29 @@
"value": ","
},
{
"type": "SYMBOL",
"name": "_typed_field"
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "_type_identifier"
}
}
]
}
]
}

View file

@ -1414,7 +1414,7 @@
"required": false,
"types": [
{
"type": "identifier",
"type": "type_identifier",
"named": true
}
]
@ -1570,7 +1570,7 @@
"required": false,
"types": [
{
"type": "identifier",
"type": "field_identifier",
"named": true
}
]
@ -1580,7 +1580,7 @@
"required": false,
"types": [
{
"type": "identifier",
"type": "type_identifier",
"named": true
}
]

File diff suppressed because it is too large Load diff