Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 5372564

Browse files
committed
grammar: support qualified type application
1 parent d5d79a0 commit 5372564

File tree

6 files changed

+8341
-8127
lines changed

6 files changed

+8341
-8127
lines changed

grammar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ module.exports = grammar({
205205
type_atom: ($) => $.atom,
206206

207207
type_application: ($) =>
208-
prec.right(PREC.MACRO_APPLICATION, seq($.atom, args($.type_expression))),
208+
prec.right(
209+
PREC.MACRO_APPLICATION,
210+
seq(opt(seq($.atom, COLON)), $.atom, args($.type_expression))
211+
),
209212

210213
type_bitstring: ($) =>
211214
seq(

src/grammar.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,27 @@
597597
"content": {
598598
"type": "SEQ",
599599
"members": [
600+
{
601+
"type": "CHOICE",
602+
"members": [
603+
{
604+
"type": "SEQ",
605+
"members": [
606+
{
607+
"type": "SYMBOL",
608+
"name": "atom"
609+
},
610+
{
611+
"type": "STRING",
612+
"value": ":"
613+
}
614+
]
615+
},
616+
{
617+
"type": "BLANK"
618+
}
619+
]
620+
},
600621
{
601622
"type": "SYMBOL",
602623
"name": "atom"

src/node-types.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@
16981698
}
16991699
},
17001700
"children": {
1701-
"multiple": false,
1701+
"multiple": true,
17021702
"required": true,
17031703
"types": [
17041704
{

0 commit comments

Comments
 (0)