Skip to content

Commit 97f229e

Browse files
author
Lukas Neubert
authored
syntax: highlight Public and Private (#8)
1 parent d6e6d20 commit 97f229e

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

syntaxes/tests/comment.bas

Lines changed: 0 additions & 3 deletions
This file was deleted.

syntaxes/tests/main.bas

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
' SYNTAX TEST "source.vba" "main syntax test"
2+
3+
Public Const FOO As Int = 1
4+
' ^^^^^^ storage.visibility
5+
6+
' some comment
7+
' ^^^^^^^^^^^^^^ comment.line
8+
9+
Private Sub doStuff()
10+
' ^^^^^^^ storage.visibility
11+
End Sub

syntaxes/vba.tmLanguage.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66
".frm"
77
],
88
"patterns": [
9-
{ "include": "#comments" }
9+
{ "include": "#comments" },
10+
{ "include": "#storage" }
1011
],
1112
"repository": {
1213
"comments": {
1314
"name": "comment.line",
1415
"begin": "'",
1516
"end": "$"
17+
},
18+
"storage": {
19+
"name": "storage.visibility",
20+
"match": "\\b(Public|Private)\\b"
1621
}
1722
}
1823
}

0 commit comments

Comments
 (0)