Merge pull request #80 from erw7/fix-numerical-syntax

Fix numerical syntax
This commit is contained in:
zah 2018-02-06 15:11:02 +02:00 committed by GitHub
commit f1d99dd8bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,10 +82,11 @@ syn match nimEscapeError "\\x\x\=\X" display contained
if nim_highlight_numbers == 1 if nim_highlight_numbers == 1
" numbers (including longs and complex) " numbers (including longs and complex)
syn match nimNumber "\v<0x\x+(\'(i|I|f|F|u|U)(8|16|32|64))?>" syn match nimNumber "\v<0[bB][01]%(_?[01])*%(\'%(%(i|I|u|U)%(8|16|32|64)|u|U|%(f|F)%(32|64|128)?|d|D))?>"
syn match nimNumber "\v<[0-9_]+(\'(i|I|f|F|u|U)(8|16|32|64))?>" syn match nimNumber "\v<0[ocC]\o%(_?\o)*%(\'%(%(i|I|u|U)%(8|16|32|64)|u|U|%(f|F)%(32|64|128)?|d|D))?>"
syn match nimNumber "\v[0-9]\.[0-9_]+([eE][+-]=[0-9_]+)=>" syn match nimNumber "\v<0[xX]\x%(_?\x)*%(\'%(%(i|I|u|U)%(8|16|32|64)|u|U|%(f|F)%(32|64|128)?|d|D))?>"
syn match nimNumber "\v<[0-9_]+(\.[0-9_]+)?([eE][+-]?[0-9_]+)?(\'(f|F)(32|64))?>" syn match nimNumber "\v<\d%(_?\d)*%(%(\'%(%(i|I|u|U)%(8|16|32|64)|u|U)|%([eE][+-]?\d%(_?\d)*)?\'%(%(%(f|F)%(32|64|128)?|d|D))))?>"
syn match nimNumber "\v<\d%(_?\d)*\.\d%(_?\d)*%([eE][+-]?\d%(_?\d)*)?%(\'%(%(f|F)%(32|64|128)?|d|D))?>"
endif endif
if nim_highlight_builtins == 1 if nim_highlight_builtins == 1