From 07a96e609ef5c9b428134c3a2c396d0f9b0c22f9 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Wed, 12 Jul 2017 11:17:59 -0700 Subject: [PATCH] Fix Vim syntax highlighting of numbers. Cretonne allows '_' in number constants. --- misc/vim/syntax/cton.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/vim/syntax/cton.vim b/misc/vim/syntax/cton.vim index 003029e1bb..d345742154 100644 --- a/misc/vim/syntax/cton.vim +++ b/misc/vim/syntax/cton.vim @@ -22,8 +22,8 @@ syn match ctonEntity /\<\(v\|ss\|jt\|fn\|sig\)\d\+\>/ syn match ctonLabel /\/ syn match ctonName /%\w\+\>/ -syn match ctonNumber /-\?\<\d\+\>/ -syn match ctonNumber /-\?\<0x\x\+\(\.\x*\)\(p[+-]\?\d\+\)\?\>/ +syn match ctonNumber /-\?\<[0-9_]\+\>/ +syn match ctonNumber /-\?\<0x[0-9a-fA-F_]\+\(\.[0-9a-fA-F_]*\)\?\(p[+-]\?\d\+\)\?\>/ syn match ctonHexSeq /#\x\+\>/ syn region ctonCommentLine start=";" end="$" contains=ctonFilecheck