forked from aniani/vim
runtime(vim): Update base-syntax, improve number matching (#14175)
- Limit blob literals to an even number of hexadecimal digits and correctly located dots. - Match octal numbers. The current version unsuccessfully attempts to match a leading '-' as part of the float literal. It's actually parsed as part of the literal for all numbers but the syntax file hasn't matched it like that for a long time and highlights negative numbers as UNARY-MINUS NUMBER. This will be fixed when better expression matching is implemented. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -29,3 +29,43 @@ echo $'Highlight interpolation:\t{{ { string({'foo': 'bar'}) } }}'
|
||||
echo $'Highlight interpolation:\t{{ { $'nested: {{ {1 + 2} }}' } }}'
|
||||
echo $"Highlight interpolation:\t{{ { string({"foo": "bar"}) } }}"
|
||||
echo $"Highlight interpolation:\t{{ { $"nested: {{ {1 + 2} }}" } }}"
|
||||
|
||||
" Number
|
||||
|
||||
" Hexadecimal
|
||||
echo 0xFF
|
||||
echo 0XFF
|
||||
echo -0xFF
|
||||
echo -0XFF
|
||||
|
||||
" Decimal
|
||||
echo 255
|
||||
echo -255
|
||||
|
||||
" Octal
|
||||
echo 0377
|
||||
echo 0o377
|
||||
echo 0O377
|
||||
echo -0377
|
||||
echo -0o377
|
||||
echo -0O377
|
||||
|
||||
" Binary
|
||||
echo 0b11111111
|
||||
echo 0B11111111
|
||||
echo -0b11111111
|
||||
echo -0B11111111
|
||||
|
||||
" Float
|
||||
123.456
|
||||
+0.0001
|
||||
55.0
|
||||
-0.123
|
||||
1.234e03
|
||||
1.0E-6
|
||||
-3.1416e+88
|
||||
|
||||
" Blob
|
||||
echo 0zFF00ED015DAF
|
||||
echo 0zFF00.ED01.5DAF
|
||||
echo 0zFF.00.ED.01.5D.AF
|
||||
|
Reference in New Issue
Block a user