From 46f6b3744e8c1f440ff8d4492e1f81af43a18e3b Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Tue, 23 Dec 2025 17:06:13 +0300 Subject: [PATCH 1/8] [Editor/Vim] `print`, `mapf`, `in`, `cfor` and operators. --- editor/glint/glint/syntax/glint.vim | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index b34954dd9..2533b67ea 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -43,9 +43,13 @@ syn keyword glintKeywords \ return \ sizeof \ match + \ print + \ in + \ mapf syn keyword glintRepeat \ for + \ cfor \ while syn keyword glintConditional @@ -69,7 +73,26 @@ syn keyword glintFunctionAttributes syn keyword glintTypeAttributes alignas -syn match glintOperators "?\|+\|-\|\*\|:\|,\|<\|>\|&\||\|!\|\~\|%\|=\|\.\|/\(/\|*\)\@!" +" syn match glintOperators "?\|+\|-\|\*\|:\|,\|<\|>\|&\||\|!\|\~\|%\|=\|\.\|/\(/\|*\)\@!" +syn match glintOperators "[/*+-\%~&|^<>]=" +syn keyword glintOperators + \ @ + \ ! + \ + + \ - + \ * + \ / + \ & + \ = + \ < + \ > + \ bitand + \ bitor + \ bitxor + \ :: + \ : + \ ++ + \ -- syn match glintNumber "\v<\d+>" @@ -107,3 +130,5 @@ hi def link glintDataTypes Structure hi def link glintSupplant StorageClass let b:current_syntax = 'glint' + +" vim:sw=2 ts=2: From 3226cab72343b0a719ffb0e49019e1dba479a732 Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Tue, 23 Dec 2025 17:43:26 +0300 Subject: [PATCH 2/8] [Editor/Vim] `csize`, `cusize` --- editor/glint/glint/syntax/glint.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index 2533b67ea..6720a6cb8 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -14,6 +14,8 @@ syn region glintString start="\"" skip="\\\"" end="\"" contains=glintSpecial syn keyword glintFFITypes \ cshort \ cushort + \ csize + \ cusize \ cint \ cuint \ clong From 2139053b2b4624296e67feb155681ebffd913502 Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Tue, 23 Dec 2025 19:00:47 +0300 Subject: [PATCH 3/8] [Editor/Vim] Fix ":" and "::" operators --- editor/glint/glint/syntax/glint.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index 6720a6cb8..ce42b812a 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -77,6 +77,7 @@ syn keyword glintTypeAttributes alignas " syn match glintOperators "?\|+\|-\|\*\|:\|,\|<\|>\|&\||\|!\|\~\|%\|=\|\.\|/\(/\|*\)\@!" syn match glintOperators "[/*+-\%~&|^<>]=" +syn match glintOperators ":" syn keyword glintOperators \ @ \ ! @@ -91,8 +92,6 @@ syn keyword glintOperators \ bitand \ bitor \ bitxor - \ :: - \ : \ ++ \ -- From 551cc9b6be7ef236f14c33c54c5c24427053f08f Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Wed, 24 Dec 2025 10:14:56 +0300 Subject: [PATCH 4/8] [Editor/Vim] Add `byte`, put capitalized types under feature flag --- editor/glint/glint/syntax/glint.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index ce42b812a..9358c492f 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -25,15 +25,20 @@ syn keyword glintFFITypes \ void syn keyword glintPrimitiveTypes - \ Bool - \ Boolean - \ Byte + \ byte \ bool \ boolean \ int \ uint \ void +if exists("glint_use_uppercase_primitives") + syn keyword glintPrimitiveTypes + \ Bool + \ Boolean + \ Byte +endif + syn keyword glintDataTypes \ struct \ enum From eaa3d0d33d6daea99a84bb50dfaff1fcbec9f9d7 Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Wed, 24 Dec 2025 10:19:12 +0300 Subject: [PATCH 5/8] [Editor/Vim] Add rest of keywords --- editor/glint/glint/syntax/glint.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index 9358c492f..b5d4928d6 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -53,6 +53,11 @@ syn keyword glintKeywords \ print \ in \ mapf + \ lambda + \ has + \ apply + \ typeof + \ template syn keyword glintRepeat \ for From a1b190545c1d9349acd12629f69286490f973d5f Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Wed, 24 Dec 2025 10:19:48 +0300 Subject: [PATCH 6/8] [Editor/Vim] `bitnot` --- editor/glint/glint/syntax/glint.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index b5d4928d6..ed2413ccd 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -102,6 +102,7 @@ syn keyword glintOperators \ bitand \ bitor \ bitxor + \ bitnot \ ++ \ -- From 83caa4040c9f5e77ef1046036e5a821c0969ba47 Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Wed, 24 Dec 2025 10:20:26 +0300 Subject: [PATCH 7/8] [Editor/Vim] Highlight `true` and `false` booleans --- editor/glint/glint/syntax/glint.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index ed2413ccd..dc3107584 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -118,6 +118,10 @@ syn keyword glintSupplant supplant " NOTE: Include semicolon at the end of line? syn match glintModuleName "\<[a-zA-Z0-9_]*" contained skipwhite +syn keyword glintBooleans + \ true + \ false + hi def link glintFFITypes Type hi def link glintPrimitiveTypes Type hi def link glintKeywords Keyword @@ -140,6 +144,7 @@ hi def link glintModuleName Function hi def link glintBuiltinFunc Identifier hi def link glintDataTypes Structure hi def link glintSupplant StorageClass +hi def link glintBooleans Boolean let b:current_syntax = 'glint' From 595ea2fc06e8e46e348e8c732ee1409fb087574f Mon Sep 17 00:00:00 2001 From: EndeyshentLabs Date: Wed, 24 Dec 2025 10:22:37 +0300 Subject: [PATCH 8/8] [Editor/Vim] Byte literal syntax --- editor/glint/glint/syntax/glint.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/glint/glint/syntax/glint.vim b/editor/glint/glint/syntax/glint.vim index dc3107584..8044d364e 100644 --- a/editor/glint/glint/syntax/glint.vim +++ b/editor/glint/glint/syntax/glint.vim @@ -10,6 +10,7 @@ syn region glintRawString start="'" end="'" display syn match glintSpecial contained "\\[nr\\\"\'t]" display syn region glintString start="\"" skip="\\\"" end="\"" contains=glintSpecial +syn region glintByte start="`" skip="\\`" end="`" contains=glintSpecial syn keyword glintFFITypes \ cshort @@ -145,6 +146,7 @@ hi def link glintBuiltinFunc Identifier hi def link glintDataTypes Structure hi def link glintSupplant StorageClass hi def link glintBooleans Boolean +hi def link glintByte Character let b:current_syntax = 'glint'