-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgomin.sublime-syntax
53 lines (49 loc) · 1.58 KB
/
gomin.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
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Go min
file_extensions:
- go
first_line_match: "-[*]-( Mode:)? Go -[*]-"
scope: source.go
contexts:
main:
- include: comments
- include: strings
- match: \b(break|c(ase|han|onst|ontinue)|def(ault|er)|else|f(allthrough|or|unc)|go(to)?|i(f|mport|nterface)|map|package|r(ange|eturn)|s(elect|truct|witch)|type|var)\b
scope: keyword
- match: \b(nil|true|false|iota)\b
scope: constant.language
- match: \b(int(16|8|32|64)?|uint(16|8|32|ptr|64)?|float(32|64)?|b(yte|ool)|error|string|rune|complex(64|128))\b
scope: storage.type
- match: \b(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\b
scope: support.function.builtin
comments:
- match: /\*
scope: punctuation.definition.comment.go
push:
- meta_scope: comment.block.go
- match: \*/
scope: punctuation.definition.comment.go
pop: true
- match: //
scope: punctuation.definition.comment.go
push:
- meta_scope: comment.line.double-slash.go
- match: \n
pop: true
strings:
- match: '"'
scope: punctuation.definition.string.begin.go
push:
- meta_scope: string.quoted.double.go
- match: '"'
scope: punctuation.definition.string.end.go
pop: true
- match: "`"
scope: punctuation.definition.string.begin.go
push:
- meta_scope: string.quoted.raw.go
- match: "`"
scope: punctuation.definition.string.end.go
pop: true