runtime(sml): Fix number regex in syntax script
Commit:
https://github.com/vim/vim/commit/d3bef6cf3f1364194c7855e0f34d636bc635c775
Author: tocariimaa <[email protected]>
Date: Mon Nov 10 20:13:35 2025 +0000
runtime(sml): Fix number regex in syntax script
closes: https://github.com/vim/vim/issues/18690
Signed-off-by: tocariimaa <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/sml.vim b/runtime/syntax/sml.vim
index 8f1af3f9b..288b2f8c7 100644
--- a/runtime/syntax/sml.vim
+++ b/runtime/syntax/sml.vim
@@ -2,9 +2,9 @@
" Language: SML
" Filenames: *.sml *.sig
" Maintainer: Markus Mottl <[email protected]>
-" Previous Maintainer: Fabrizio Zeno Cornelli
-" <[email protected]> (invalid)
-" Last Change: 2022 Apr 01
+" Previous Maintainer: Fabrizio Zeno Cornelli <[email protected]>
(invalid)
+" Last Change: 2025 Nov 07 - Update Number Regex
+" 2022 Apr 01
" 2015 Aug 31 - Fixed opening of modules (Ramana Kumar)
" 2006 Oct 23 - Fixed character highlighting bug (MM)
@@ -152,9 +152,11 @@ syn match smlKeyChar ";"
syn match smlKeyChar "\*"
syn match smlKeyChar "="
-syn match smlNumber "\<-\=\d\+\>"
-syn match smlNumber "\<-\=0[x|X]\x\+\>"
-syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>"
+syn match smlNumber "\~\=\<\d\+\>"
+syn match smlNumber "\~\=\<0x\x\+\>"
+syn match smlWord "\<0w\d\+\>"
+syn match smlWord "\<0wx\x\+\>"
+syn match smlReal "\~\=\<\d\+\.\d\+\%([eE]\~\=\d\+\)\=\>"
" Synchronization
syn sync minlines=20
@@ -208,6 +210,7 @@ hi def link smlOperator Keyword
hi def link smlBoolean Boolean
hi def link smlCharacter Character
hi def link smlNumber Number
+hi def link smlWord Number
hi def link smlReal Float
hi def link smlString String
hi def link smlType Type
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vJWPE-001DHc-EB%40256bit.org.