-
Notifications
You must be signed in to change notification settings - Fork 4
/
navbar.sublime-syntax
110 lines (107 loc) · 3.56 KB
/
navbar.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Navigational Bar VHDL
scope: text.hierarchy-vhdl
hidden: true
contexts:
main:
- match: ^\s*()(\w+)\s*(?=\(|\[)
captures:
1: meta.annotation.marker.hierarchy-vhdl
2: entity.name.hierarchy-vhdl
push:
- match: \)
pop: true
- include: constant_numeric
- match: \((\w+)
captures:
1: storage.name.type.hierarchy-vhdl
- match: ^\s+(\w+)(?:\s*\((function|task)\))
captures:
1: entity.name.method.hierarchy-vhdl
2: storage.name.method.hierarchy-vhdl
- match: ^\s*(\w+)\s*(?=\(|\[)
captures:
1: entity.name.hierarchy-vhdl
push:
- match: \)
pop: true
- include: constant_numeric
- match: \((\w+)
captures:
1: storage.name.type.userdefined.hierarchy-vhdl
- match: ^\s+(\*)
captures:
1: keyword.operator.list.hierarchy-vhdl
push:
- meta_scope: meta.simple-list.hierarchy-vhdl
- match: \n
pop: true
- include: signals
- match: '^\s*(Members|Ports|Signals|Instances)'
captures:
1: keyword.hierarchy-vhdl
- match: '^\s*(Functions|Procedures)\s*(:)'
captures:
1: keyword.hierarchy-vhdl
2: keyword.operator.separator.hierarchy-vhdl
push:
- include: signals
- match: '^ (\w*)'
captures:
1: entity.name.method.hierarchy-vhdl
- match: '(?=^\S)'
pop: true
- match: '^(\w+)'
captures:
1: keyword.top-level.hierarchy-vhdl
# - include: constant_numeric
signals:
- match: (<->|<-|->|=>)
scope: support.type.hierarchy-vhdl
- match: \b(?i:downto|to|signal|variable)\b
scope: keyword.control.hierarchy-vhdl
- match: (\w+)\s+(:)\s*(signal|variable)\b
captures:
1: source.name.hierarchy-vhdl
2: keyword.operator.separator.hierarchy-vhdl
3: keyword.control.hierarchy-vhdl
- match: (\w+)\s+(:)\s*(\w+)
captures:
1: source.name.hierarchy-vhdl
2: keyword.operator.separator.hierarchy-vhdl
3: storage.name.type.hierarchy-vhdl
- include: constant_numeric
- include: operator
operator:
- match: (:=|\*|/|-|\+)
scope: keyword.operator.hierarchy-vhdl
constant_numeric:
- match: '\b([+\-]?[\d_]+\.[\d_]+([eE][+\-]?[\d_]+)?)\b'
scope: constant.numeric.floating_point.vhdl
- match: '\b(\d+#)[0-9a-fA-F_]+(#)'
scope: constant.numeric.base_pound_number_pound.vhdl
captures:
1 : punctuation.definition.numeric.hexadecimal.vhdl
2 : punctuation.definition.numeric.hexadecimal.vhdl
- match: '\b[\d_]+([eE][\d_]+)?\b'
scope: constant.numeric.integer.vhdl
- match: '(\d*[xX])"[0-9a-fA-F_uUxXzZwWlLhH\-]+"'
scope: constant.numeric.quoted.double.string.hex.vhdl
captures:
1 : punctuation.definition.numeric.hexadecimal.vhdl
- match: '(\d*[oO])"[0-7_uUxXzZwWlLhH\-]+"'
scope: constant.numeric.quoted.double.string.octal.vhdl
captures:
1 : punctuation.definition.numeric.octal.vhdl
- match: '(\d*[bB]?)"[01_uUxXzZwWlLhH\-]+"'
scope: constant.numeric.quoted.double.string.binary.vhdl
captures:
1 : punctuation.definition.numeric.binary.vhdl
- match: '(\d*[bBoOxX]".+?")'
scope: constant.numeric.quoted.double.string.illegal.vhdl
captures:
1: invalid.illegal.quoted.double.string.vhdl
- match: '''[01uUxXzZwWlLhH\-]'''
scope: constant.numeric.quoted.single.std_logic