-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathwerk.sublime-syntax
44 lines (43 loc) · 1.19 KB
/
werk.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
%YAML 1.2
---
# http://www.sublimetext.com/docs/syntax.html
name: Werk
scope: source.werk
contexts:
main:
- include: keywords
- include: operators
- include: builtins
- include: strings
- include: constants
- include: comments
builtins:
- match: |-
\b(glob|which|env|shell|which|info|warn|error|write|copy|delete|info|warn|error|flatten|join|split|split-pattern|map|lines|filter-match|filter|discard|match|assert-eq|assert-match)\b
scope: support.function.werk
comments:
- match: '#.*$'
scope: comment.line.werk
constants:
- match: \b(true|false)\b
scope: constant.language.werk
keywords:
- match: \b(config|let|build|task|from|to|depfile|run)\b
scope: keyword.control.werk
operators:
- match: (\||=>)
scope: keyword.operator.werk
strings:
- match: '"'
push:
- meta_scope: string.quoted.double.werk
- match: '"'
pop: true
- match: \\.
scope: constant.character.escape.werk
- match: '\{.*?\}'
scope: support.variable.werk
- match: \<.*?\>
scope: support.variable.werk
- match: '%'
scope: constant.language.werk