From bfac24584f80f303c7ca64362b75f0f0ff0cbbad Mon Sep 17 00:00:00 2001 From: Justus Adam Date: Mon, 6 Feb 2017 16:39:12 +0100 Subject: [PATCH] Added highlighting for parameters See #11 --- syntaxes/haskell.tmLanguage | 97 +++++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 5 deletions(-) diff --git a/syntaxes/haskell.tmLanguage b/syntaxes/haskell.tmLanguage index de61989..b66913e 100644 --- a/syntaxes/haskell.tmLanguage +++ b/syntaxes/haskell.tmLanguage @@ -559,14 +559,12 @@ support.constant.haskell --> - match - \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - constant.other.haskell + include + #data_constructor match - ^\s*(?:(let|where)\s+)?([\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)\b(?=.*?[^\p{P}\p{S}]=[^\p{P}\p{S}]) + ^\s*(?:(let|where)\s+)?([\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)\b(.*?[^\p{P}\p{S}])(?==[^\p{P}\p{S}]) captures 1 @@ -579,6 +577,67 @@ name entity.name.function.haskell + 3 + + patterns + + + include + #arguments + + + + + + + match + (\\)(.+?)(->) + captures + + 1 + + name + keyword.other.haskell + + 2 + + patterns + + + include + #arguments + + + + 3 + + name + keyword.other.haskell + + + name + entity.lamda.haskell + + + match + ^\s*(.+?)(<-) + captures + + 1 + + patterns + + + include + #arguments + + + + 2 + + name + keyword.other.haskell + @@ -859,6 +918,34 @@ + data_constructor + + match + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*\b + name + constant.other.haskell + + binding + + match + \b[\p{Ll}\p{Lo}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*\b + name + variable.parameter.haskell + + arguments + + patterns + + + include + #binding + + + include + #data_constructor + + + type_signature patterns