Skip to content

Commit 6e0a1d4

Browse files
Add basic syntax highlighting for user function definitions.
Note that this does not support syntax highlighting for user function calls.
1 parent 533c680 commit 6e0a1d4

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v0.13.0
2+
3+
## New Features
4+
5+
* Add basic syntax highlighting for user function definitions. Note that this does not support syntax highlighting for user function calls.
6+
17
# v0.12.0
28

39
## New Features

fastbuild.tmLanguage.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
},
3939
{
4040
"include": "#function"
41+
},
42+
{
43+
"include": "#userFunction"
4144
}
4245
],
4346
"repository": {
@@ -181,6 +184,21 @@
181184
"match": "\\b(?:Alias|Compiler|Copy|CopyDir|CSAssembly|DLL|Error|Exec|Executable|ForEach|If|Library|ListDependencies|ObjectList|Print|RemoveDir|Settings|Test|TextFile|Unity|Using|VCXProject|VSProjectExternal|VSSolution|XCodeProject)\\b"
182185
}
183186
]
187+
},
188+
"userFunction": {
189+
"patterns": [
190+
{
191+
"match": "\\b(function) ([a-zA-Z_][a-zA-Z0-9_]*)\\b",
192+
"captures": {
193+
"1": {
194+
"name": "storage.type.function.fastbuild"
195+
},
196+
"2": {
197+
"name": "support.function.fastbuild"
198+
}
199+
}
200+
}
201+
]
184202
}
185203
}
186204
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "fastbuild-support",
33
"displayName": "FASTBuild Support",
44
"description": "FASTBuild language support. Includes go-to definition, find references, variable evaluation, syntax errors, etc.",
5-
"version": "0.12.0",
5+
"version": "0.13.0",
66
"preview": true,
77
"publisher": "HarrisonT",
88
"author": {

0 commit comments

Comments
 (0)