-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshrug.sublime-syntax
More file actions
51 lines (43 loc) · 1.18 KB
/
shrug.sublime-syntax
File metadata and controls
51 lines (43 loc) · 1.18 KB
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
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: Shrug
file_extensions:
- shrug
scope: source.shrug
contexts:
main:
# Strings begin and end with quotes, and use backslashes as an escape
# character
- match: '"'
scope: punctuation.definition.string.begin.shrug
push: double_quoted_string
# Comments begin with a '#' and finish at the end of the line
- match: '#'
scope: punctuation.definition.comment.shrug
push: line_comment
- match: '¯\\_\(ツ\)_\/¯'
scope: keyword.control.shrug
push: even_shrug
# Numbers and boolean
- match: '\b((-)?[0-9.]+)\b'
scope: constant.numeric.shrug
# Numbers and boolean
- match: '\b(True|False)\b'
scope: constant.language.shrug
# Variable
- match: '\b([A-Za-z])\b'
scope: variable.other.shrug
double_quoted_string:
- meta_scope: string.quoted.double.shrug
- match: '"'
scope: punctuation.definition.string.end.shrug
pop: true
line_comment:
- meta_scope: comment.line.shrug
- match: $
pop: true
even_shrug:
- match: '( ¯\\_\(ツ\)_\/¯)|( )'
scope: keyword.operator.shrug
pop: true