Skip to content

Commit

Permalink
wrap curly block body
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Jul 23, 2022
1 parent dd191a8 commit 99381fb
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 107 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ module.exports = grammar({
block: $ => prec(PREC.CURLY_BLOCK, seq(
'{',
field('parameters', optional($.block_parameters)),
optional($.block_body),
optional(field('body', $.block_body)),
'}'
)),

Expand Down
8 changes: 6 additions & 2 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -4952,8 +4952,12 @@
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "block_body"
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "block_body"
}
},
{
"type": "BLANK"
Expand Down
20 changes: 10 additions & 10 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,16 @@
"type": "block",
"named": true,
"fields": {
"body": {
"multiple": false,
"required": false,
"types": [
{
"type": "block_body",
"named": true
}
]
},
"parameters": {
"multiple": false,
"required": false,
Expand All @@ -1065,16 +1075,6 @@
}
]
}
},
"children": {
"multiple": false,
"required": false,
"types": [
{
"type": "block_body",
"named": true
}
]
}
},
{
Expand Down
Loading

0 comments on commit 99381fb

Please sign in to comment.