summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/testdir
diff options
context:
space:
mode:
authorthinca <thinca@gmail.com>2024-01-28 18:57:23 +0100
committerChristian Brabandt <cb@256bit.org>2024-01-28 18:58:14 +0100
commitcf8695d48cdded63043430af5a84185e9614e84c (patch)
treea7eedcfd180e184f46528868043dbe344333b61b /runtime/syntax/testdir
parent21ce159e05615fd139c564b734a4bffc9f3fdc4b (diff)
runtime(vim): Highlight string interpolation
closes: #13923 Signed-off-by: thinca <thinca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax/testdir')
-rw-r--r--runtime/syntax/testdir/dumps/vim_expr_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_expr_99.dump20
-rw-r--r--runtime/syntax/testdir/input/vim_expr.vim14
3 files changed, 54 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/dumps/vim_expr_00.dump b/runtime/syntax/testdir/dumps/vim_expr_00.dump
new file mode 100644
index 0000000000..6330599d79
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |S|t|r|i|n|g| +0#0000000&@66
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|I|t|'@1|s| |a| |s|t|r|i|n|g|'| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|t|a|b|:| |\|t|,| |n|e|w| |l|i|n|e|:| |\|n|,| |b|a|c|k|s|l|a|s|h|:| |\@1|'| +0#0000000&@31
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|t|a|b|:| |\+0#e000e06&|t|,+0#e000002&| |n|e|w| |l|i|n|e|:| |\+0#e000e06&|n|,+0#e000002&| |b|a|c|k|s|l|a|s|h|:| |\+0#e000e06&@1|"+0#e000002&| +0#0000000&@31
+@75
+|"+0#0000e05&| |S|t|r|i|n|g| |i|n|t|e|r|p|o|l|a|t|i|o|n| +0#0000000&@52
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|D|o|n|'@1|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|'| +0#0000000&@22
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|"| +0#0000000&@23
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#0000000&| |s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|'+0#e000002&|f|o@1|'|:+0#0000000&| |'+0#e000002&|b|a|r|'|}+0#e000e06&|)| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@8
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#0000000&| |$+0#e000002&|'|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#0000000&|1| |++0#af5f00255&| +0#0000000&|2|}| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@6
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#0000000&| |s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|"+0#e000002&|f|o@1|"|:+0#0000000&| |"+0#e000002&|b|a|r|"|}+0#e000e06&|)| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@8
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#0000000&| |$+0#e000002&|"|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#0000000&|1| |++0#af5f00255&| +0#0000000&|2|}| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@6
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|e|x|p|r|.|v|i|m|"| |1|4|L|,| |5|2@1|B| @26|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_99.dump b/runtime/syntax/testdir/dumps/vim_expr_99.dump
new file mode 100644
index 0000000000..10447b8c35
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |S|t|r|i|n|g| +0#0000000&@66
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|I|t|'@1|s| |a| |s|t|r|i|n|g|'| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|t|a|b|:| |\|t|,| |n|e|w| |l|i|n|e|:| |\|n|,| |b|a|c|k|s|l|a|s|h|:| |\@1|'| +0#0000000&@31
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|t|a|b|:| |\+0#e000e06&|t|,+0#e000002&| |n|e|w| |l|i|n|e|:| |\+0#e000e06&|n|,+0#e000002&| |b|a|c|k|s|l|a|s|h|:| |\+0#e000e06&@1|"+0#e000002&| +0#0000000&@31
+@75
+|"+0#0000e05&| |S|t|r|i|n|g| |i|n|t|e|r|p|o|l|a|t|i|o|n| +0#0000000&@52
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|D|o|n|'@1|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|'| +0#0000000&@22
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|"| +0#0000000&@23
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#0000000&| |s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|'+0#e000002&|f|o@1|'|:+0#0000000&| |'+0#e000002&|b|a|r|'|}+0#e000e06&|)| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@8
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#0000000&| |$+0#e000002&|'|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#0000000&|1| |++0#af5f00255&| +0#0000000&|2|}| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@6
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#0000000&| |s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|"+0#e000002&|f|o@1|"|:+0#0000000&| |"+0#e000002&|b|a|r|"|}+0#e000e06&|)| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@8
+>e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#0000000&| |$+0#e000002&|"|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#0000000&|1| |++0#af5f00255&| +0#0000000&|2|}| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&|}| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@6
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|e|x|p|r|.|v|i|m|"| |1|4|L|,| |5|2@1|B| @26|1|4|,|1| @9|A|l@1|
diff --git a/runtime/syntax/testdir/input/vim_expr.vim b/runtime/syntax/testdir/input/vim_expr.vim
new file mode 100644
index 0000000000..0547e9bd43
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_expr.vim
@@ -0,0 +1,14 @@
+" String
+
+echo 'It''s a string'
+echo 'tab: \t, new line: \n, backslash: \\'
+echo "tab: \t, new line: \n, backslash: \\"
+
+" String interpolation
+
+echo 'Don''t highlight interpolation: {{ {1 + 2} }}'
+echo "Don't highlight interpolation: {{ {1 + 2} }}"
+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} }}" } }}"