commit 3be6efa5ef6e43683d6b72a209a90cd090b3ab64
parent 6141ee588c2e69c0e914c352c3e588ea9407e120
Author: Amelia Clarke <me@rsaihe.dev>
Date: Sat, 13 Aug 2022 21:57:31 -0700
Highlight capital E in number literals
Signed-off-by: Amelia Clarke <me@rsaihe.dev>
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/syntax/hare.vim b/syntax/hare.vim
@@ -29,16 +29,16 @@ syn region hareString start=+`+ end=+`+ contains=hareEscapeRaw
"adapted from c.vim
"integer number, or floating point number without a dot and with "f".
syn match hareNumbers display transparent "\v<\d" contains=hareNumber,hareOctal,hareBinary,hareFloat
-syn match hareNumber display contained "\v\d+(e[-+]?\d+)?(z|[iu](8|16|32|64)?)?"
+syn match hareNumber display contained "\v\d+([Ee][-+]?\d+)?(z|[iu](8|16|32|64)?)?"
"hex number
syn match hareNumber display contained "\v0x\x+(z|[iu](8|16|32|64)?)?"
"octal number
syn match hareOctal display contained "\v0o\o+(z|[iu](8|16|32|64)?)?"
"binary number
syn match hareBinary display contained '\v0b[01]+(z|[iu](8|16|32|64)?)?'
-syn match hareFloat display contained "\v\d+(e[-+]?\d+)?(f32|f64)"
+syn match hareFloat display contained "\v\d+([Ee][-+]?\d+)?(f32|f64)"
"floating point number, with dot, optional exponent
-syn match hareFloat display contained "\v\d+\.\d+(e[-+]?\d+)?(f32|f64)?"
+syn match hareFloat display contained "\v\d+\.\d+([Ee][-+]?\d+)?(f32|f64)?"
syn match hareSpaceError display excludenl "\v\s+$"
syn match hareSpaceError display "\v +\t"me=e-1