on 89fcbb2 help sign in
bat/assets/syntaxes/Cabal.sublime-syntax
47 lines 1.4 kB history raw
1%YAML 1.2
2---
3# http://www.sublimetext.com/docs/3/syntax.html
4name: Cabal
5file_extensions:
6 - cabal
7scope: source.cabal
8contexts:
9 main:
10 - match: ^(\s*)(exposed-modules):$
11 captures:
12 2: constant.other.cabal
13 push:
14 - meta_scope: exposed.modules.cabal
15 - match: ^(?!\1\s)
16 pop: true
17 - include: module_name
18 - match: ^(\s*)(build-depends):$
19 captures:
20 2: constant.other.cabal
21 push:
22 - meta_scope: exposed.modules.cabal
23 - match: ^(?!\1\s)
24 pop: true
25 - match: "([<>=]+)|([&|]+)"
26 scope: keyword.operator.haskell
27 - match: ((\d+|\*)\.)*(\d+|\*)
28 scope: constant.numeric.haskell
29 - match: '([\w\-]+)'
30 scope: support.function.haskell
31 - match: '^\s*([a-zA-Z_-]+)(:)\s+'
32 scope: entity.cabal
33 captures:
34 1: constant.other.cabal
35 2: punctuation.entity.cabal
36 - match: '^(?i)(executable|library|test-suite|benchmark|flag|source-repository)\s+([^\s,]+)\s*$'
37 scope: entity.cabal
38 captures:
39 1: keyword.entity.cabal
40 2: string.cabal
41 - match: ^(?i)library\s*$
42 scope: keyword.entity.cabal
43 - match: "--.*$"
44 scope: comment.cabal
45 module_name:
46 - match: '([A-Z][A-Za-z_''0-9]*)(\.[A-Z][A-Za-z_''0-9]*)*'
47 scope: storage.module.haskell