Skip to content

Commit

Permalink
highlight static
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 committed Nov 28, 2024
1 parent 9ece5a3 commit ed7c96d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog
## 0.7.0 - 2024-11-28
- Highlight `static`
-


## 0.6.1 - 2024-10-27
- Fix highlighting of compile time if/else

Expand Down
2 changes: 1 addition & 1 deletion syntaxes/bait.yaml-tmlanguage
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ repository:
- name: keyword.fun
match: \bfun\b
- name: keyword.other
match: \b(as|assert|const|enum|global|import|interface|mut|package|pub|struct|type|typeof)\b
match: \b(as|assert|const|enum|global|import|interface|mut|package|pub|static|struct|type|typeof)\b
- name: keyword.control
match: \b(and|break|continue|else|for|if|in|is|match|not|or|return)\b
- name: keyword.control.comptime
Expand Down
7 changes: 6 additions & 1 deletion syntaxes/tests/other.bt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SYNTAX TEST "source.bait" "main syntax test"

global my_global_var := 'val'
static my_static_var := 'val'
// <------ keyword.other

type CustomFunType = fun() string
Expand All @@ -13,6 +13,11 @@ enum Color {
blue
}

struct Foo {
global g_field i32
// ^^^^^^ keyword.other
}

fun myfun() {
mut c := `A`
// ^^^ keyword.other
Expand Down

0 comments on commit ed7c96d

Please sign in to comment.