Skip to content

Commit ab08c68

Browse files
author
Lukas Neubert
committed
syntax: Attribute
1 parent 860a39e commit ab08c68

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

syntaxes/tests/main.bas

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
' SYNTAX TEST "source.vba" "main syntax test"
22

3+
Attribute VB_Name = "SyntaxTest"
4+
' ^^^^^^^^^ keyword.attribute
5+
36
Public Const FOO As Int = 1
47
' ^^^^^^ storage.modifier.visibility
58

syntaxes/vba.tmLanguage.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,30 @@
88
"patterns": [
99
{ "include": "#comments" },
1010
{ "include": "#visibility" },
11-
{ "include": "#option" }
11+
{ "include": "#option" },
12+
{ "include": "#keywords" }
1213
],
1314
"repository": {
1415
"comments": {
1516
"name": "comment.line",
1617
"begin": "'",
1718
"end": "$"
1819
},
19-
"visibility": {
20-
"name": "storage.modifier.visibility",
21-
"match": "\\b(Public|Private)\\b"
20+
"keywords": {
21+
"patterns": [
22+
{
23+
"name": "keyword.attribute",
24+
"match": "\\bAttribute\\b"
25+
}
26+
]
2227
},
2328
"option": {
2429
"name": "storage.modifier.option",
25-
"match": "Option (Explicit|Private Module|Base|(Compare (Binary|Text)+))?"
30+
"match": "\\bOption (Explicit|Private Module|Base|(Compare (Binary|Text)+))?\\b"
31+
},
32+
"visibility": {
33+
"name": "storage.modifier.visibility",
34+
"match": "\\b(Public|Private)\\b"
2635
}
2736
}
2837
}

0 commit comments

Comments
 (0)