From fd74d8b2b170b540680a9bbf6c64990f8ebafd08 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 8 Oct 2018 19:00:59 +0200 Subject: Update --- syntax/toml.vim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'syntax/toml.vim') 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 -- cgit v1.2.3