summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/testdir/input
diff options
context:
space:
mode:
authordkearns <dougkearns@gmail.com>2024-03-12 07:40:58 +1100
committerGitHub <noreply@github.com>2024-03-11 21:40:58 +0100
commit5cd86c6cff94256ed2db872c46b57da259a648ac (patch)
tree7a674ec8792c65dfb431064ff68fc17a65202704 /runtime/syntax/testdir/input
parent49ffb6b428e1e053446ec0209558a8f9d0963ae7 (diff)
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>
Diffstat (limited to 'runtime/syntax/testdir/input')
-rw-r--r--runtime/syntax/testdir/input/vim_expr.vim40
1 files changed, 40 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/input/vim_expr.vim b/runtime/syntax/testdir/input/vim_expr.vim
index 439c1b6b46..cf5838ce05 100644
--- a/runtime/syntax/testdir/input/vim_expr.vim
+++ b/runtime/syntax/testdir/input/vim_expr.vim
@@ -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