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
---
name: Just
file_extensions:
- just
scope: source.just
variables:
identifier: '[A-Za-z_][A-Za-z0-9_-]*'
contexts:
prototype:
- include: comments
main:
- include: strings
- match: '^\s*(?:set|export|alias|import|mod)\b'
scope: keyword.control.just
- match: '^\s*({{identifier}})(?=\s*(?:\([^)]*\))?:)'
captures:
1: entity.name.function.just
- match: '\b{{identifier}}(?=\s*:=)'
scope: variable.other.readwrite.assignment.just
- match: '\{\{[^}]+\}\}'
scope: variable.parameter.just
- match: '--[A-Za-z][A-Za-z0-9-]*'
scope: variable.parameter.just
- match: ':=|[-+*/%=&|<>!?:]+'
scope: keyword.operator.just
comments:
- match: '#.*$'
scope: comment.line.number-sign.just
strings:
- match: '"'
push: double-quoted-string
- match: "'"
push: single-quoted-string
- match: '`'
push: shell-string
double-quoted-string:
- meta_scope: string.quoted.double.just
- match: '\\.'
scope: constant.character.escape.just
- match: '"'
pop: true
single-quoted-string:
- meta_scope: string.quoted.single.just
- match: '\\.'
scope: constant.character.escape.just
- match: "'"
pop: true
shell-string:
- meta_scope: string.interpolated.just
- match: '`'
pop: true