Skip to content

Commit 836d758

Browse files
committed
infix data ctor
1 parent 7a3ab95 commit 836d758

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/purescript.coffee

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,19 @@ purescriptGrammar =
403403
patterns: [
404404
include: '#comments'
405405
,
406-
include: '#type_name'
406+
include: '#data_ctor'
407407
,
408408
name: 'constant.numeric'
409409
match: /\d+/
410410
,
411411
match: /({operator})/
412412
captures:
413413
1: name: 'keyword.other'
414+
,
415+
match: /\b(type)\s+({className})\b/
416+
captures:
417+
1: name: 'keyword.other'
418+
2: name: 'entity.name.type'
414419
,
415420
match: /\b(as|type)\b/
416421
captures:

test/Main.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ infixl 6 type Sum as :+: -- comment
106106
infixl 7 type Product as :*:
107107

108108

109+
-- Ctor operators
110+
infixl 2 Inl as $%
111+
infixr 2 Inr as %$
109112

110113
-- type class signatures
111114

0 commit comments

Comments
 (0)