summaryrefslogtreecommitdiffstats
path: root/genvim.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-30 17:56:42 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-30 17:56:42 -0700
commit100d678b1f53f9cba3054a6b7aca21e407eb36ce (patch)
treed6ea65f86f85cae1be33fa0f22a5f4e81d253719 /genvim.txr
parent4c07394a2b81daf0e3e2ff346d98bc7ac5d33069 (diff)
downloadtxr-100d678b1f53f9cba3054a6b7aca21e407eb36ce.tar.gz
txr-100d678b1f53f9cba3054a6b7aca21e407eb36ce.tar.bz2
txr-100d678b1f53f9cba3054a6b7aca21e407eb36ce.zip
vim: more accurate treatment of brace vars.
The txr_bracevar region is not appropriate for quasiliterals, because it contains txr_regex. * genvim.txr (tl_bracevar): New syn region, based on copying txr_bracevar and changing it so it contains tl_regex and not txr_regex. (txr_quasilit): Contain tl_bracevar rather than txr_bracevar.
Diffstat (limited to 'genvim.txr')
-rw-r--r--genvim.txr3
1 files changed, 2 insertions, 1 deletions
diff --git a/genvim.txr b/genvim.txr
index c961e50e..43b2d1f9 100644
--- a/genvim.txr
+++ b/genvim.txr
@@ -145,6 +145,7 @@ syn match txr_buf_error "[^']" contained
syn match txr_buf_interior "\([@hex][\n\t ]*[@hex]\|[\n\t ]\+\)" contained
syn region txr_bracevar matchgroup=Delimiter start="@@[ \t]*[*]\?{" matchgroup=Delimiter end="}" contains=txr_num,txr_pnum,tl_ident,tl_splice,tl_metanum,txr_metaat,txr_circ,txr_braced_ident,txr_dot,txr_dotdot,txr_string,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_regex,txr_quasilit,txr_chr,txr_nested_error
+syn region tl_bracevar contained matchgroup=Delimiter start="@@[ \t]*[*]\?{" matchgroup=Delimiter end="}" contains=txr_num,txr_pnum,tl_ident,tl_splice,tl_metanum,txr_metaat,txr_circ,txr_braced_ident,txr_dot,txr_dotdot,txr_string,txr_list,txr_bracket,txr_mlist,txr_mbracket,tl_regex,txr_quasilit,txr_chr,txr_nested_error
@ (if txr-p)
syn region txr_directive matchgroup=Delimiter start="@@[ \t]*(" matchgroup=Delimiter end=")" contains=txr_keyword,txr_string,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_num,txr_pnum,txr_badnum,tl_ident,tl_regex,txr_string,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_circ,txr_ncomment,txr_nested_error
@ (end)
@@ -153,7 +154,7 @@ syn region txr_bracket @(if txr-p "contained ")matchgroup=Delimiter start="\[" m
syn region txr_mlist @(if txr-p "contained ")matchgroup=Delimiter start="@@[ \t^',]*(" matchgroup=Delimiter end=")" contains=tl_keyword,txr_string,tl_regex,txr_num,txr_pnum,txr_badnum,tl_ident,txr_metanum,txr_ign_par,txr_ign_bkt,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_buf,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_circ,txr_ncomment,txr_nested_error
syn region txr_mbracket matchgroup=Delimiter start="@@[ \t^',]*\[" matchgroup=Delimiter end="\]" contains=tl_keyword,txr_string,tl_regex,txr_num,txr_pnum,txr_badnum,tl_ident,txr_metanum,txr_ign_par,txr_ign_bkt,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_buf,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_circ,txr_ncomment,txr_nested_error
syn region txr_string @(if txr-p "contained ")start=+#\?\*\?"+ end=+["\n]+ contains=txr_stresc,txr_numesc,txr_badesc
-syn region txr_quasilit @(if txr-p "contained ")start=+#\?\*\?`+ end=+[`\n]+ contains=txr_splicevar,txr_metanum,txr_bracevar,txr_mlist,txr_mbracket,txr_escat,txr_stresc,txr_numesc,txr_badesc
+syn region txr_quasilit @(if txr-p "contained ")start=+#\?\*\?`+ end=+[`\n]+ contains=txr_splicevar,txr_metanum,tl_bracevar,txr_mlist,txr_mbracket,txr_escat,txr_stresc,txr_numesc,txr_badesc
syn region txr_regex @(if txr-p "contained ")start="/" end="[/\n]" contains=txr_regesc,txr_numesc,txr_badesc
syn region tl_regex @(if txr-p "contained ")start="#/" end="[/\n]" contains=txr_regesc,txr_numesc,txr_badesc
syn region txr_buf @(if txr-p "contained ")matchgroup=txr_buf start="#b'" end="'" contains=txr_buf_interior,txr_buf_error