Skip to content

Commit

Permalink
parser: add frame phrase to prompt_for_statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbz64 committed Apr 19, 2024
1 parent 6f8c82b commit 7198d09
Show file tree
Hide file tree
Showing 5 changed files with 92,816 additions and 92,334 deletions.
9 changes: 5 additions & 4 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1152,10 +1152,11 @@ module.exports = grammar({
seq(
kw("PROMPT-FOR"),
choice($.identifier, $.qualified_name),
optional(kw("EDITING")),
":",
optional($.body),
$._block_terminator
optional(seq(kw("FRAME"), field("frame", $.identifier))),
choice(
seq(kw("EDITING"), ":", optional($.body), $._block_terminator),
$._terminator
)
),

// Supertypes
Expand Down
87 changes: 65 additions & 22 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -11404,45 +11404,88 @@
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[eE][dD][iI][tT][iI][nN][gG]"
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "[fF][rR][aA][mM][eE]"
}
}
},
"named": false,
"value": "FRAME"
},
{
"type": "FIELD",
"name": "frame",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
}
},
"named": false,
"value": "EDITING"
]
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ":"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "body"
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "[eE][dD][iI][tT][iI][nN][gG]"
}
}
},
"named": false,
"value": "EDITING"
},
{
"type": "STRING",
"value": ":"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "body"
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "_block_terminator"
}
]
},
{
"type": "BLANK"
"type": "SYMBOL",
"name": "_terminator"
}
]
},
{
"type": "SYMBOL",
"name": "_block_terminator"
}
]
},
Expand Down
17 changes: 16 additions & 1 deletion src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,18 @@
{
"type": "prompt_for_statement",
"named": true,
"fields": {},
"fields": {
"frame": {
"multiple": false,
"required": false,
"types": [
{
"type": "identifier",
"named": true
}
]
}
},
"children": {
"multiple": true,
"required": true,
Expand All @@ -2417,6 +2428,10 @@
{
"type": "identifier",
"named": true
},
{
"type": "qualified_name",
"named": true
}
]
}
Expand Down
Loading

0 comments on commit 7198d09

Please sign in to comment.