Skip to content

Commit

Permalink
updated parser.c as well
Browse files Browse the repository at this point in the history
  • Loading branch information
r001 committed Nov 12, 2023
1 parent ef3ec61 commit 23a9534
Show file tree
Hide file tree
Showing 3 changed files with 13,502 additions and 12,979 deletions.
37 changes: 35 additions & 2 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,35 @@
"type": "STRING",
"value": "leo"
},
"program_name_literal": {
"type": "SEQ",
"members": [
{
"type": "PATTERN",
"value": "[a-z]"
},
{
"type": "REPEAT",
"content": {
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "[a-zA-Z]"
},
{
"type": "PATTERN",
"value": "[0-9]"
},
{
"type": "STRING",
"value": "_"
}
]
}
}
]
},
"this_program_id": {
"type": "SEQ",
"members": [
Expand All @@ -1013,7 +1042,7 @@
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
"name": "program_name_literal"
}
},
{
Expand Down Expand Up @@ -1041,7 +1070,7 @@
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
"name": "program_name_literal"
}
},
{
Expand Down Expand Up @@ -3837,6 +3866,10 @@
"program_id",
"record_type",
"variable"
],
[
"program_name_literal",
"variable_identifier"
]
],
"precedences": [],
Expand Down
9 changes: 7 additions & 2 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -23062,7 +23062,7 @@
"required": true,
"types": [
{
"type": "identifier",
"type": "program_name_literal",
"named": true
}
]
Expand Down Expand Up @@ -23108,6 +23108,11 @@
]
}
},
{
"type": "program_name_literal",
"named": true,
"fields": {}
},
{
"type": "record_declaration",
"named": true,
Expand Down Expand Up @@ -32341,7 +32346,7 @@
"required": true,
"types": [
{
"type": "identifier",
"type": "program_name_literal",
"named": true
}
]
Expand Down
Loading

0 comments on commit 23a9534

Please sign in to comment.