-
Notifications
You must be signed in to change notification settings - Fork 2
/
ssHash.sublime-syntax
61 lines (54 loc) · 1.51 KB
/
ssHash.sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
%YAML 1.2
---
name: ssHash
fileTypes: []
scope: source.ssHash
contexts:
# The prototype context is prepended to all contexts but those setting
# meta_include_prototype: false.
prototype:
- include: comments
main:
- include: numbers
- include: strings
# - include: budsym
numbers:
- match: '\b(-)?[0-9.]+\b'
scope: constant.numeric.ssHash
strings:
- match: '"'
scope: punctuation.definition.string.begin.ssHash
push: inside_string
inside_string:
- meta_include_prototype: false
- meta_scope: string.quoted.double.ssHash
- match: '\.'
scope: constant.character.escape.ssHash
- match: '"'
scope: punctuation.definition.string.end.ssHash
pop: true
comments:
# Comments begin with a '//' and finish at the end of the line.
- match: '#'
scope: punctuation.definition.comment.ssHash
push:
- include: budsym
- meta_scope: comment.line.double-slash.ssHash
- match: $\n?
pop: true
budsym-terminator:
- match: '[ ]*(#*)[ ]*($\n?)'
captures:
1: punctuation.definition.heading.end.markdown
2: meta.whitespace.newline.markdown
pop: true
budsym:
- meta_include_prototype: false
- match: ' >>'
# - match: '(>{1,6})(?!>)\s*(?=\S)'
captures:
1: punctuation.definition.heading.begin.markdown
push:
- meta_scope: markup.heading.markdown
- meta_content_scope: entity.name.section.markdown
- include: budsym-terminator