commit b075ec0969677b93204c3c5fb4232f4212523ecb
parent 7917fde527c7b7cf0f11bc5576a9d9df10ad003d
Author: Sebastian <sebastian@sebsite.pw>
Date: Fri, 8 Sep 2023 00:23:00 -0400
syntax: add hex float constants
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/syntax/hare.vim b/syntax/hare.vim
@@ -63,6 +63,8 @@ syn match hareNumber "\v(\.@1<!|\.\.)\zs<0x\x+(z|[iu](8|16|32|64)?)?>" display
" Floating-point number literals.
syn match hareFloat "\v<(0|[1-9]\d*)\.\d+([Ee][+-]?\d+)?(f32|f64)?>" display
syn match hareFloat "\v<(0|[1-9]\d*)([Ee][+-]?\d+)?(f32|f64)>" display
+syn match hareFloat "\v<0x\x+\.\x+([Pp][+-]?\d+(f32|f64)?)?>" display
+syn match hareFloat "\v<0x\x+[Pp][+-]?\d+(f32|f64)?>" display
" String and rune literals.
syn match hareEscape "\\[\\'"0abfnrtv]" contained display