From c1602309bed3e3b31d2f48defefcfb37ecd082b6 Mon Sep 17 00:00:00 2001 From: Justus Adam Date: Sun, 26 Apr 2020 19:05:49 +0100 Subject: [PATCH] module and pattern keyword in export lists Closes #18 --- CHANGELOG.md | 2 ++ syntaxes/haskell.YAML-tmLanguage | 6 ++++++ test/syntax-examples/test.hs | 3 +++ 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0626f13..6eacdb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ ([#44](https://github.com/JustusAdam/language-haskell/issues/44)) - Support for visible type applications ([#73](https://github.com/JustusAdam/language-haskell/issues/73)) - Support for nested block comments by [@reactormonk](https://github.com/reactormonk) +- `module` and `pattern` keyword in export lists + ([#18](https://github.com/JustusAdam/language-haskell/issues/18)) - As a substantial internal change the grammar migratd to the YAML format, to make it easier to maintain and develop with. - Refined many of the tm scopes with new information available from the parser diff --git a/syntaxes/haskell.YAML-tmLanguage b/syntaxes/haskell.YAML-tmLanguage index 3287949..7c77f24 100644 --- a/syntaxes/haskell.YAML-tmLanguage +++ b/syntaxes/haskell.YAML-tmLanguage @@ -428,6 +428,12 @@ repository: '0': {name: punctuation.paren.haskell} name: meta.declaration.exports.haskell patterns: + - match: '\b(module)\b(?!'')' + captures: + '1': {name: keyword.other.module.haskell} + - match: '\b(pattern)\b(?!'')' + captures: + '1': {name: keyword.other.haskell} - match: >- \b[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* name: entity.name.function.haskell diff --git a/test/syntax-examples/test.hs b/test/syntax-examples/test.hs index a340da3..84e79bb 100644 --- a/test/syntax-examples/test.hs +++ b/test/syntax-examples/test.hs @@ -2,8 +2,11 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecursiveDo #-} +-- Module keyword in export list + module Main (module M + , pattern Q , M ) where