Skip to content

Commit

Permalink
Remove 'type' field from _type
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-guichard committed Nov 6, 2023
1 parent d5e0cac commit d4ea76a
Show file tree
Hide file tree
Showing 4 changed files with 1,746,833 additions and 1,748,776 deletions.
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,13 @@ module.exports = grammar({

_type: $ => seq(
optional($.type_modifiers),
field('type', choice(
choice(
$.parenthesized_type,
$.nullable_type,
$._type_reference,
$.function_type,
$.not_nullable_type
))
)
),

_type_reference: $ => prec.left(1, choice(
Expand Down
50 changes: 23 additions & 27 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2452,33 +2452,29 @@
]
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "parenthesized_type"
},
{
"type": "SYMBOL",
"name": "nullable_type"
},
{
"type": "SYMBOL",
"name": "_type_reference"
},
{
"type": "SYMBOL",
"name": "function_type"
},
{
"type": "SYMBOL",
"name": "not_nullable_type"
}
]
}
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "parenthesized_type"
},
{
"type": "SYMBOL",
"name": "nullable_type"
},
{
"type": "SYMBOL",
"name": "_type_reference"
},
{
"type": "SYMBOL",
"name": "function_type"
},
{
"type": "SYMBOL",
"name": "not_nullable_type"
}
]
}
]
},
Expand Down
Loading

0 comments on commit d4ea76a

Please sign in to comment.