Skip to content

Commit

Permalink
add comprehensive (and passing!) test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
friedbrice committed Sep 30, 2018
1 parent 9de6538 commit db43cad
Show file tree
Hide file tree
Showing 3 changed files with 509 additions and 135 deletions.
31 changes: 19 additions & 12 deletions Haskell.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:
id_tail: '[a-zA-Z0-9_'']*'
type_id: '[A-Z]{{id_tail}}'
val_id: '[a-z_]{{id_tail}}'
op_id: '[!#$%&*+./<=>?@\\\^|\-~:]+'
op_id: '[!#$%&*+./<=>?@\\\^|\-~:∷→⇒]+'

contexts:
main:
Expand Down Expand Up @@ -55,7 +55,7 @@ contexts:
scope: entity.other.inherited-class.haskell
- match: '\b{{val_id}}\b'
scope: variable.other.generic-type.haskell
- match: '(=>|⇒)'
- match: '{{op_id}}'
scope: keyword.operator.haskell
- match: '\b(import)\b'
captures:
Expand All @@ -67,7 +67,7 @@ contexts:
- match: '(qualified|as|hiding)'
scope: keyword.other.haskell
- include: module_name
- include: module_exports
- include: module_imports
- include: comments
- match: '(deriving)\s*\('
captures:
Expand Down Expand Up @@ -224,19 +224,26 @@ contexts:
- match: '$'
pop: true
- include: block_comment
imports_exports:
- include: comments
- match: '\b({{type_id}})(\(.[^\)]*\)|)'
captures:
1: storage.type.haskell
- match: '\(({{op_id}})\)'
captures:
1: keyword.operator.haskell
- match: '\)'
pop: true
module_exports:
- match: '\('
push:
- meta_scope: meta.declaration.exports.haskell
- include: comments
- match: '\b({{type_id}})(\(.[^\)]*\)|)'
captures:
1: storage.type.haskell
- match: '\(({{op_id}})\)'
captures:
1: keyword.operator.haskell
- match: '\)'
pop: true
- include: imports_exports
module_imports:
- match: '\('
push:
- meta_scope: meta.declaration.imports.haskell
- include: imports_exports
module_name:
- match: '{{type_id}}'
scope: support.other.module.haskell
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,23 @@ Permission granted to anyone who posesses the software to use, distribute, and m
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

**Pull requests welcomed!** While I don't have time to work on feature requests, I will happily consider any pull requests and either merge them or give feedback.

## Versioning Scheme

Releases will be identified via Git tags, which will always be in the format

```
v{{ MAJOR }}.{{ MINOR }}.{{ PATCH }}
```

where `MAJOR`, `MINOR`, and `PATCH` are non-negative integers.

Release version numbers are chosen by considering the following rules, in short-circuit order:

* Whenever existing assertions in the test suit are changed or removed, we will bump the `MAJOR` version (with `MINOR` and `PATCH` rolling over to `0`).

* Whenever new assertions are added that enhance the granularity of syntax highlighting, we will bump the `MINOR` version (with `PATCH` rolling over to `0`).

* Whenever a bug is fixed, with or without adding assertions, we will bump the `PATCH` version.

It's worth noting that the distinction between `MINOR` bumps and `PATCH` bumps is somewhat vague, sometimes making the decision a matter of taste. The rule defining a `MAJOR` bump, however, is unambiguous.
Loading

0 comments on commit db43cad

Please sign in to comment.