summaryrefslogtreecommitdiffstats
path: root/syntax/toml.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2018-10-08 19:00:59 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2018-10-08 19:00:59 +0200
commitfd74d8b2b170b540680a9bbf6c64990f8ebafd08 (patch)
treeb1fdef6203a78a21053d1b8e0666ab7a38c36df2 /syntax/toml.vim
parent055f7710b65dfa2df52fc0b5be2486ae36ac5751 (diff)
downloadvim-polyglot-3.3.3.tar.gz
vim-polyglot-3.3.3.zip
Updatev3.3.3
Diffstat (limited to 'syntax/toml.vim')
-rw-r--r--syntax/toml.vim12
1 files changed, 8 insertions, 4 deletions
diff --git a/syntax/toml.vim b/syntax/toml.vim
index 1decc5fb..671f1456 100644
--- a/syntax/toml.vim
+++ b/syntax/toml.vim
@@ -27,12 +27,16 @@ syn region tomlString oneline start=/'/ end=/'/
syn region tomlString start=/'''/ end=/'''/
hi def link tomlString String
-syn match tomlInteger /\<[+-]\=[0-9]\(_\=\d\)*\>/ display
-syn match tomlInteger /\<[+-]\=\(inf\|nan\)\>/ display
+syn match tomlInteger /[+-]\=\<[1-9]\(_\=\d\)*\>/ display
+syn match tomlInteger /[+-]\=\<0\>/ display
+syn match tomlInteger /[+-]\=\<0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*\>/ display
+syn match tomlInteger /[+-]\=\<0o[0-7]\(_\=[0-7]\)*\>/ display
+syn match tomlInteger /[+-]\=\<0b[01]\(_\=[01]\)*\>/ display
+syn match tomlInteger /[+-]\=\<\(inf\|nan\)\>/ display
hi def link tomlInteger Number
-syn match tomlFloat /\<[+-]\=[0-9]\(_\=\d\)*\.\d\+\>/ display
-syn match tomlFloat /\<[+-]\=[0-9]\(_\=\d\)*\(\.[0-9]\(_\=\d\)*\)\=[eE][+-]\=[0-9]\(_\=\d\)*\>/ display
+syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\.\d\+\>/ display
+syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*\>/ display
hi def link tomlFloat Float
syn match tomlBoolean /\<\%(true\|false\)\>/ display