Skip to content

Commit

Permalink
chore: generate
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 15, 2023
1 parent 8f71d9c commit 71977ea
Show file tree
Hide file tree
Showing 3 changed files with 66,337 additions and 53,441 deletions.
308 changes: 276 additions & 32 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@
{
"type": "SYMBOL",
"name": "exec_statement"
},
{
"type": "SYMBOL",
"name": "type_alias_statement"
}
]
},
Expand Down Expand Up @@ -1620,6 +1624,22 @@
"name": "identifier"
}
},
{
"type": "FIELD",
"name": "type_parameters",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_parameter"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "FIELD",
"name": "parameters",
Expand Down Expand Up @@ -1858,6 +1878,31 @@
}
]
},
"type_alias_statement": {
"type": "PREC_DYNAMIC",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "type"
},
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "type"
}
]
}
},
"class_definition": {
"type": "SEQ",
"members": [
Expand All @@ -1873,6 +1918,22 @@
"name": "identifier"
}
},
{
"type": "FIELD",
"name": "type_parameters",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_parameter"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "FIELD",
"name": "superclasses",
Expand Down Expand Up @@ -1903,6 +1964,44 @@
}
]
},
"type_parameter": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "["
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "type"
}
]
}
}
]
},
{
"type": "STRING",
"value": "]"
}
]
},
"parenthesized_list_splat": {
"type": "PREC",
"value": 1,
Expand Down Expand Up @@ -4071,8 +4170,135 @@
}
},
"type": {
"type": "SYMBOL",
"name": "expression"
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "SYMBOL",
"name": "splat_type"
},
{
"type": "SYMBOL",
"name": "generic_type"
},
{
"type": "SYMBOL",
"name": "union_type"
},
{
"type": "SYMBOL",
"name": "constrained_type"
},
{
"type": "SYMBOL",
"name": "member_type"
}
]
},
"splat_type": {
"type": "PREC",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "*"
},
{
"type": "STRING",
"value": "**"
}
]
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
},
"generic_type": {
"type": "PREC",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "type_parameter"
}
]
}
},
"union_type": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "STRING",
"value": "|"
},
{
"type": "SYMBOL",
"name": "type"
}
]
}
},
"constrained_type": {
"type": "PREC_RIGHT",
"value": 0,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "STRING",
"value": ":"
},
{
"type": "SYMBOL",
"name": "type"
}
]
}
},
"member_type": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
},
"keyword_argument": {
"type": "SEQ",
Expand Down Expand Up @@ -5220,38 +5446,52 @@
"value": "[_\\p{XID_Start}][_\\p{XID_Continue}]*"
},
"keyword_identifier": {
"type": "PREC",
"value": -3,
"content": {
"type": "ALIAS",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "print"
},
{
"type": "STRING",
"value": "exec"
},
{
"type": "STRING",
"value": "async"
},
{
"type": "STRING",
"value": "await"
"type": "CHOICE",
"members": [
{
"type": "PREC",
"value": -3,
"content": {
"type": "ALIAS",
"content": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "print"
},
{
"type": "STRING",
"value": "exec"
},
{
"type": "STRING",
"value": "async"
},
{
"type": "STRING",
"value": "await"
},
{
"type": "STRING",
"value": "match"
}
]
},
{
"type": "STRING",
"value": "match"
}
]
"named": true,
"value": "identifier"
}
},
"named": true,
"value": "identifier"
}
{
"type": "ALIAS",
"content": {
"type": "STRING",
"value": "type"
},
"named": true,
"value": "identifier"
}
]
},
"true": {
"type": "STRING",
Expand Down Expand Up @@ -5391,6 +5631,10 @@
[
"print_statement",
"primary_expression"
],
[
"type_alias_statement",
"primary_expression"
]
],
"precedences": [],
Expand Down
Loading

0 comments on commit 71977ea

Please sign in to comment.