File tree Expand file tree Collapse file tree 3 files changed +39
-22
lines changed
Expand file tree Collapse file tree 3 files changed +39
-22
lines changed Original file line number Diff line number Diff line change 11' SYNTAX TEST "source.vba" "main syntax test"
2+ Attribute VB_Name = "SyntaxTest"
3+ ' <--------- keyword.Attribute.vba
24
3- Attribute VB_Name = "SyntaxTest"
4- ' ^^^^^^^^^ keyword.Attribute.vba
5+ Public Const FOO As Integer = 1
6+ ' <------ storage.modifier.visibility
7+ ' ^^^^^ keyword.Const.vba
8+ ' ^^ keyword.As.vba
59
6- Public Const FOO As Integer = 1
7- ' ^^^^^^ storage.modifier.visibility
8- ' ^^^^^ keyword.Const.vba
9- ' ^^ keyword.As.vba
10-
11- ' some comment
12- ' ^^^^^^^^^^^^^^ comment.line.quote
13-
14- Dim obj As Object
15- ' ^^^ keyword.Dim.vba
16- Set obj = Nothing
17- ' ^^^ keyword.Set.vba
18- ' ^^^^^^^ keyword.Nothing.vba
10+ Dim obj As Object
11+ ' <--- keyword.Dim.vba
12+ Set obj = Nothing
13+ ' <--- keyword.Set.vba
14+ ' ^^^^^^^ keyword.Nothing.vba
1915Set obj = New Object
2016' ^^^ keyword.New.vba
17+
18+ With presentation
19+ ' <---- keyword.control.With.vba
20+ For Each slide In .Slides
21+ ' ^^^ keyword.control.For.vba
22+ ' ^^^^ keyword.control.Each.vba
23+ Next ' Some comment
24+ ' ^^^^ keyword.control.Next.vba
25+ ' ^^^^^^^^^^^^^^ comment.line.quote
26+ End With
27+ ' <-------- keyword.control.End.vba
Original file line number Diff line number Diff line change 33 Private Sub doStuff (x As String )
44' ^^^^^^^ storage.modifier.visibility
55' ^^^ keyword.Sub.vba
6- End Sub
7- ' ^^^ keyword.End.vba
8- ' ^^^ keyword.Sub.vba
6+ End Sub
7+ ' <------- keyword.End.vba
98
109 Function foo () As Boolean
1110' ^^^^^^^^ keyword.Function.vba
1211' ^^ keyword.As.vba
1312' ^^^^^^^ support.type.Boolean
14- End Function
15- ' ^^^ keyword.End.vba
16- ' ^^^^^^^^ keyword.Function.vba
13+ End Function
14+ ' <------------ keyword.End.vba
1715
1816Function withParam (Optional p1 As MyType )
1917' ^^^^^^^^ storage.modifier.visibility
Original file line number Diff line number Diff line change 2424 "patterns" : [
2525 {
2626 "name" : " keyword.$1.vba" ,
27- "match" : " \\ b(As|Attribute|Const|Dim|Function|New|Nothing|Set|Sub|End)\\ b"
27+ "match" : " \\ b(As|Attribute|Const|Dim|Function|New|Nothing|Set|Sub)\\ b"
28+ },
29+ {
30+ "name" : " keyword.End.vba" ,
31+ "match" : " \\ bEnd (Sub|Function)\\ b"
32+ },
33+ {
34+ "name" : " keyword.control.$1.vba" ,
35+ "match" : " \\ b(Each|For|In|Next|With)\\ b"
36+ },
37+ {
38+ "name" : " keyword.control.End.vba" ,
39+ "match" : " \\ bEnd (With)\\ b"
2840 }
2941 ]
3042 },
You can’t perform that action at this time.
0 commit comments