From 14da0fb2d81a64ba4db78bed5a64522b58f351a2 Mon Sep 17 00:00:00 2001 From: MuntasirSZN Date: Sun, 9 Mar 2025 08:49:14 +0100 Subject: [PATCH] patch 9.1.1188: runtime(tera): tera support can be improved Problem: runtime(tera): tera support can be improved Solution: update tera filetype plugin, include a tera syntax script include tera syntax tests, update the filetype test, update makemenu and synmenu vim scripts (MuntasirSZN) closes: #16830 Signed-off-by: MuntasirSZN Signed-off-by: Christian Brabandt --- .github/MAINTAINERS | 1 + runtime/ftplugin/tera.vim | 23 ++- runtime/makemenu.vim | 3 +- runtime/synmenu.vim | 43 +++--- runtime/syntax/tera.vim | 96 +++++++++++++ runtime/syntax/testdir/dumps/tera_00.dump | 20 +++ runtime/syntax/testdir/dumps/tera_01.dump | 20 +++ runtime/syntax/testdir/dumps/tera_02.dump | 20 +++ runtime/syntax/testdir/dumps/tera_03.dump | 20 +++ runtime/syntax/testdir/dumps/tera_04.dump | 20 +++ runtime/syntax/testdir/dumps/tera_05.dump | 20 +++ runtime/syntax/testdir/dumps/tera_06.dump | 20 +++ runtime/syntax/testdir/dumps/tera_07.dump | 20 +++ runtime/syntax/testdir/dumps/tera_08.dump | 20 +++ runtime/syntax/testdir/dumps/tera_09.dump | 20 +++ runtime/syntax/testdir/input/tera.tera | 165 ++++++++++++++++++++++ src/testdir/test_filetype.vim | 2 +- src/version.c | 2 + 18 files changed, 509 insertions(+), 26 deletions(-) create mode 100644 runtime/syntax/tera.vim create mode 100644 runtime/syntax/testdir/dumps/tera_00.dump create mode 100644 runtime/syntax/testdir/dumps/tera_01.dump create mode 100644 runtime/syntax/testdir/dumps/tera_02.dump create mode 100644 runtime/syntax/testdir/dumps/tera_03.dump create mode 100644 runtime/syntax/testdir/dumps/tera_04.dump create mode 100644 runtime/syntax/testdir/dumps/tera_05.dump create mode 100644 runtime/syntax/testdir/dumps/tera_06.dump create mode 100644 runtime/syntax/testdir/dumps/tera_07.dump create mode 100644 runtime/syntax/testdir/dumps/tera_08.dump create mode 100644 runtime/syntax/testdir/dumps/tera_09.dump create mode 100644 runtime/syntax/testdir/input/tera.tera diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index a71f01b292..f47bbbbce3 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -621,6 +621,7 @@ runtime/syntax/swig.vim @jmarrec runtime/syntax/systemverilog.vim @Kocha runtime/syntax/tap.vim @petdance runtime/syntax/tcsh.vim @dkearns +runtime/syntax/tera.vim @MuntasirSZN runtime/syntax/teraterm.vim @k-takata runtime/syntax/terraform.vim @gpanders runtime/syntax/thrift.vim @jiangyinzuo diff --git a/runtime/ftplugin/tera.vim b/runtime/ftplugin/tera.vim index 47636f29fa..65bae70048 100644 --- a/runtime/ftplugin/tera.vim +++ b/runtime/ftplugin/tera.vim @@ -1,13 +1,30 @@ " Vim filetype plugin file " Language: Tera " Maintainer: Muntasir Mahmud -" Last Change: 2025 Mar 06 +" Last Change: 2025 Mar 08 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 -setlocal commentstring={#\ %s\ #} +setlocal autoindent -let b:undo_ftplugin = "setlocal commentstring<" +setlocal commentstring={#\ %s\ #} +setlocal comments=s:{#,e:#} + +if exists("loaded_matchit") + let b:match_ignorecase = 0 + let b:match_words = '{#:##\|#},{% *if:{% *else\>:{% *elif\>:{% *endif %},{% *for\>:{% *endfor %},{% *macro\>:{% *endmacro %},{% *block\>:{% *endblock %},{% *filter\>:{% *endfilter %},{% *set\>:{% *endset %},{% *raw\>:{% *endraw %},{% *with\>:{% *endwith %}' +endif + +setlocal includeexpr=substitute(v:fname,'\\([^.]*\\)$','\\1','g') +setlocal suffixesadd=.tera + +setlocal expandtab +setlocal shiftwidth=2 +setlocal softtabstop=2 + +let b:undo_ftplugin = "setlocal autoindent< commentstring< comments< " .. + \ "includeexpr< suffixesadd< expandtab< shiftwidth< softtabstop<" +let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words" diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim index 6707f2b6a6..8ef1788894 100644 --- a/runtime/makemenu.vim +++ b/runtime/makemenu.vim @@ -2,7 +2,7 @@ vim9script # Script to define the syntax menu in synmenu.vim # Maintainer: The Vim Project -# Last Change: 2023 Aug 10 +# Last Change: 2025 Mar 09 # Former Maintainer: Bram Moolenaar # This is used by "make menu" in the src directory. @@ -605,6 +605,7 @@ SynMenu T.TealInfo:tli SynMenu T.Telix\ Salt:tsalt SynMenu T.Termcap/Printcap:ptcap SynMenu T.Terminfo:terminfo +SynMenu T.Tera:tera SynMenu T.Tera\ Term:teraterm SynMenu T.TeX.TeX/LaTeX:tex SynMenu T.TeX.plain\ TeX:plaintex diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim index 23c1c7b95b..164b04f9ae 100644 --- a/runtime/synmenu.vim +++ b/runtime/synmenu.vim @@ -2,7 +2,7 @@ " This file is normally sourced from menu.vim. " " Maintainer: The Vim Project -" Last Change: 2024 Jan 04 +" Last Change: 2025 Mar 09 " Former Maintainer: Bram Moolenaar " Define the SetSyn function, used for the Syntax menu entries. @@ -578,26 +578,27 @@ an 50.150.190 &Syntax.T.TealInfo :cal SetSyn("tli") an 50.150.200 &Syntax.T.Telix\ Salt :cal SetSyn("tsalt") an 50.150.210 &Syntax.T.Termcap/Printcap :cal SetSyn("ptcap") an 50.150.220 &Syntax.T.Terminfo :cal SetSyn("terminfo") -an 50.150.230 &Syntax.T.Tera\ Term :cal SetSyn("teraterm") -an 50.150.240 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex") -an 50.150.250 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex") -an 50.150.260 &Syntax.T.TeX.Initex :cal SetSyn("initex") -an 50.150.270 &Syntax.T.TeX.ConTeXt :cal SetSyn("context") -an 50.150.280 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf") -an 50.150.290 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo") -an 50.150.300 &Syntax.T.TF\ mud\ client :cal SetSyn("tf") -an 50.150.310 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy") -an 50.150.320 &Syntax.T.Tilde :cal SetSyn("tilde") -an 50.150.330 &Syntax.T.Tmux\ configuration :cal SetSyn("tmux") -an 50.150.340 &Syntax.T.TPP :cal SetSyn("tpp") -an 50.150.350 &Syntax.T.Trasys\ input :cal SetSyn("trasys") -an 50.150.360 &Syntax.T.Treetop :cal SetSyn("treetop") -an 50.150.370 &Syntax.T.Trustees :cal SetSyn("trustees") -an 50.150.380 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl") -an 50.150.390 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm") -an 50.150.400 &Syntax.T.TSS.Optics :cal SetSyn("tssop") -an 50.150.410 &Syntax.T.Typescript :cal SetSyn("typescript") -an 50.150.420 &Syntax.T.TypescriptReact :cal SetSyn("typescriptreact") +an 50.150.230 &Syntax.T.Tera :cal SetSyn("tera") +an 50.150.240 &Syntax.T.Tera\ Term :cal SetSyn("teraterm") +an 50.150.250 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex") +an 50.150.260 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex") +an 50.150.270 &Syntax.T.TeX.Initex :cal SetSyn("initex") +an 50.150.280 &Syntax.T.TeX.ConTeXt :cal SetSyn("context") +an 50.150.290 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf") +an 50.150.300 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo") +an 50.150.310 &Syntax.T.TF\ mud\ client :cal SetSyn("tf") +an 50.150.320 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy") +an 50.150.330 &Syntax.T.Tilde :cal SetSyn("tilde") +an 50.150.340 &Syntax.T.Tmux\ configuration :cal SetSyn("tmux") +an 50.150.350 &Syntax.T.TPP :cal SetSyn("tpp") +an 50.150.360 &Syntax.T.Trasys\ input :cal SetSyn("trasys") +an 50.150.370 &Syntax.T.Treetop :cal SetSyn("treetop") +an 50.150.380 &Syntax.T.Trustees :cal SetSyn("trustees") +an 50.150.390 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl") +an 50.150.400 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm") +an 50.150.410 &Syntax.T.TSS.Optics :cal SetSyn("tssop") +an 50.150.420 &Syntax.T.Typescript :cal SetSyn("typescript") +an 50.150.430 &Syntax.T.TypescriptReact :cal SetSyn("typescriptreact") an 50.160.100 &Syntax.UV.Udev\ config :cal SetSyn("udevconf") an 50.160.110 &Syntax.UV.Udev\ permissions :cal SetSyn("udevperm") an 50.160.120 &Syntax.UV.Udev\ rules :cal SetSyn("udevrules") diff --git a/runtime/syntax/tera.vim b/runtime/syntax/tera.vim new file mode 100644 index 0000000000..922b9c9752 --- /dev/null +++ b/runtime/syntax/tera.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: Tera +" Maintainer: Muntasir Mahmud +" Last Change: 2025 Mar 09 + +if exists("b:current_syntax") + finish +endif + +" Detect the underlying language based on filename pattern +" For files like file.html.tera, we want to load html syntax +let s:filename = expand("%:t") +let s:dotpos = strridx(s:filename, '.', strridx(s:filename, '.tera') - 1) +let s:underlying_filetype = "" + +if s:dotpos != -1 + let s:underlying_ext = s:filename[s:dotpos+1:strridx(s:filename, '.tera')-1] + if s:underlying_ext != "" && s:underlying_ext != "tera" + let s:underlying_filetype = s:underlying_ext + endif +endif + +" Load the underlying language syntax if detected +if s:underlying_filetype != "" + execute "runtime! syntax/" . s:underlying_filetype . ".vim" + unlet! b:current_syntax +else + " Default to HTML if no specific language detected + runtime! syntax/html.vim + unlet! b:current_syntax +endif + +" Tera comment blocks: {# comment #} +syn region teraCommentBlock start="{#" end="#}" contains=@Spell containedin=cssDefinition,cssStyle,htmlHead,htmlTitle + +" Tera statements: {% if condition %} +syn region teraStatement start="{%" end="%}" contains=teraKeyword,teraString,teraNumber,teraFunction,teraBoolean,teraFilter,teraOperator containedin=cssDefinition,cssStyle,htmlHead,htmlTitle + +" Tera expressions: {{ variable }} +syn region teraExpression start="{{" end="}}" contains=teraString,teraNumber,teraFunction,teraBoolean,teraFilter,teraOperator,teraIdentifier containedin=cssDefinition,cssStyle,htmlHead,htmlTitle + +" Special handling for raw blocks - content inside shouldn't be processed +syn region teraRawBlock start="{% raw %}" end="{% endraw %}" contains=TOP,teraCommentBlock,teraStatement,teraExpression + +" Control structure keywords +syn keyword teraKeyword contained if else elif endif for endfor in macro endmacro +syn keyword teraKeyword contained block endblock extends include import set endset +syn keyword teraKeyword contained break continue filter endfilter raw endraw with endwith + +" Identifiers - define before operators for correct priority +syn match teraIdentifier contained "\<\w\+\>" + +" Operators used in expressions and statements +syn match teraOperator contained "==\|!=\|>=\|<=\|>\|<\|+\|-\|*\|/" +syn match teraOperator contained "{\@" +syn match teraNumber contained "\<\d\+\.\d\+\>" + +" Boolean values +syn keyword teraBoolean contained true false + +" Highlighting links +hi def link teraCommentBlock Comment +hi def link teraKeyword Statement +hi def link teraOperator Operator +hi def link teraFunction Function +hi def link teraIdentifier Identifier +hi def link teraString String +hi def link teraNumber Number +hi def link teraBoolean Boolean +hi def link teraFilter PreProc + +" Special highlighting for blocks and expressions +hi def link teraStatement PreProc +hi def link teraExpression PreProc + +" Clean up script-local variables +unlet s:filename +unlet s:dotpos +if exists("s:underlying_ext") + unlet s:underlying_ext +endif +unlet s:underlying_filetype + +let b:current_syntax = "tera" diff --git a/runtime/syntax/testdir/dumps/tera_00.dump b/runtime/syntax/testdir/dumps/tera_00.dump new file mode 100644 index 0000000000..5c15b4c0a4 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_00.dump @@ -0,0 +1,20 @@ +><+0#0000e05#ffffff0|!|D|O|C|T|Y|P|E| |h|t|m|l|>| +0#0000000&@59 +|<+0#00e0e07&|h+0#af5f00255&|t|m|l| +0#00e0e07&|l+0#00e0003&|a|n|g|=+0#00e0e07&|"+0#e000002&|e|n|"|>+0#00e0e07&| +0#0000000&@58 +|<+0#00e0e07&|h+0#af5f00255&|e|a|d|>+0#00e0e07&| +0#0000000&@68 +| +0#e000e06&@3|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|c+0#00e0003&|h|a|r|s|e|t|=+0#00e0e07&|"+0#e000002&|U|T|F|-|8|"|>+0#00e0e07&| +0#0000000&@48 +| +0#e000e06&@3|<+0#00e0e07&|m+0#af5f00255&|e|t|a| +0#00e0e07&|n+0#00e0003&|a|m|e|=+0#00e0e07&|"+0#e000002&|v|i|e|w|p|o|r|t|"| +0#00e0e07&|c+0#00e0003&|o|n|t|e|n|t|=+0#00e0e07&|"+0#e000002&|w|i|d|t|h|=|d|e|v|i|c|e|-|w|i|d|t|h|,| |i|n|i|t|i|a|l|-|s|c|a|l|e|=|1|.|0|"|>+0#00e0e07&| +0#0000000& +| +0#e000e06&@3|<+0#00e0e07&|t+0#af5f00255&|i|t|l|e|>+0#00e0e07&|{+0#e000e06&@1| |p+0#00e0e07&|a|g|e|_|t|i|t|l|e| +0#e000e06&||| |d|e|f|a|u|l|t|(|v+0#00e0e07&|a|l|u|e|=+0#e000e06&|"+0#e000002&|T|e|r|a| |T|e|s|t|"|)+0#e000e06&| |}@1|<+0#00e0e07&|/|t+0#af5f00255&|i|t|l|e|>+0#00e0e07&| +0#0000000&@10 +| +0#e000e06&@3|{|%| |i+0#af5f00255&|f| +0#e000e06&|i|n|c|l|u|d|e|_|s|t|y|l|e|s| |%|}| +0#0000000&@47 +| +0#e000e06&@3|<+0#00e0e07&|s+0#af5f00255&|t|y|l|e|>+0#00e0e07&| +0#0000000&@63 +@8|b+0#af5f00255&|o|d|y| +0#0000000&|{+0#00e0e07&| +0#0000000&@60 +@12|f+0#00e0003&|o|n|t|-|f|a|m|i|l|y|:+0#0000000&| |{+0#e000e06&@1| |f+0#00e0e07&|o|n|t|_|f|a|m|i|l|y| +0#e000e06&||| |d|e|f|a|u|l|t|(|v+0#00e0e07&|a|l|u|e|=+0#e000e06&|"+0#e000002&|s|a|n|s|-|s|e|r|i|f|"|)+0#e000e06&| |}@1|;+0#0000000&| @1 +@12|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|3@2|;+0#0000000&| @50 +@12|l+0#00e0003&|i|n|e|-|h|e|i|g|h|t|:+0#0000000&| |1+0#e000002&|.|6|;+0#0000000&| @45 +@8|}+0#00e0e07&| +0#0000000&@65 +@8|.+0#00e0e07&|c|o|n|t|a|i|n|e|r| +0#0000000&|{+0#00e0e07&| +0#0000000&@54 +@12|w+0#00e0003&|i|d|t|h|:+0#0000000&| |8+0#e000002&|0|%|;+0#0000000&| @51 +@12|m+0#00e0003&|a|r|g|i|n|:+0#0000000&| |0+0#e000002&| +0#0000000&|a+0#e000002&|u|t|o|;+0#0000000&| @47 +@8|}+0#00e0e07&| +0#0000000&@65 +@8|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|d|a|r|k|_|m|o|d|e| |%|}| +0#0000000&@48 +@8|b+0#af5f00255&|o|d|y| +0#0000000&|{+0#00e0e07&| +0#0000000&@60 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/tera_01.dump b/runtime/syntax/testdir/dumps/tera_01.dump new file mode 100644 index 0000000000..67d4a51208 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|.+0#00e0e07&|c|o|n|t|a|i|n|e|r| +0#0000000&|{+0#00e0e07&| +0#0000000&@54 +@12|w+0#00e0003&|i|d|t|h|:+0#0000000&| |8+0#e000002&|0|%|;+0#0000000&| @51 +@12|m+0#00e0003&|a|r|g|i|n|:+0#0000000&| |0+0#e000002&| +0#0000000&|a+0#e000002&|u|t|o|;+0#0000000&| @47 +@8|}+0#00e0e07&| +0#0000000&@65 +@8|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|d|a|r|k|_|m|o|d|e| |%|}| +0#0000000&@48 +@8>b+0#af5f00255&|o|d|y| +0#0000000&|{+0#00e0e07&| +0#0000000&@60 +@12|b+0#00e0003&|a|c|k|g|r|o|u|n|d|-|c|o|l|o|r|:+0#0000000&| |#+0#e000002&|2@2|;+0#0000000&| @39 +@12|c+0#00e0003&|o|l|o|r|:+0#0000000&| |#+0#e000002&|e@2|;+0#0000000&| @50 +@8|}+0#00e0e07&| +0#0000000&@65 +@8|{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@55 +@4|<+0#00e0e07&|/|s+0#af5f00255&|t|y|l|e|>+0#00e0e07&| +0#0000000&@62 +| +0#e000e06&@3|{|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@59 +|<+0#00e0e07&|/|h+0#af5f00255&|e|a|d|>+0#00e0e07&| +0#0000000&@67 +|<+0#00e0e07&|b+0#af5f00255&|o|d|y|>+0#00e0e07&| +0#0000000&@68 +@4|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|c|o|n|t|a|i|n|e|r|"|>+0#00e0e07&| +0#0000000&@47 +@8|{+0#0000e05&|#| |H|e|a|d|e|r| |S|e|c|t|i|o|n| |w|i|t|h| |v|a|r|i|a|b|l|e| |i|n|t|e|r|p|o|l|a|t|i|o|n| |#|}| +0#0000000&@18 +@8|<+0#00e0e07&|h+0#af5f00255&|e|a|d|e|r|>+0#00e0e07&| +0#0000000&@58 +@12|<+0#00e0e07&|h+0#af5f00255&|1|>+0#00e0e07&|{+0#e000e06&@1| |h|e|a|d|e|r|_|t|e|x|t| ||| |u|p@1|e|r| |}@1|<+0#00e0e07&|/|h+0#af5f00255&|1|>+0#00e0e07&| +0#0000000&@28 +@12|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|s|u|b|h|e|a|d|e|r| |%|}| +0#0000000&@44 +@57|1|9|,|9| @10|8|%| diff --git a/runtime/syntax/testdir/dumps/tera_02.dump b/runtime/syntax/testdir/dumps/tera_02.dump new file mode 100644 index 0000000000..aab7f08b76 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@11|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|s|u|b|h|e|a|d|e|r| |%|}| +0#0000000&@44 +@16|<+0#00e0e07&|h+0#af5f00255&|2|>+0#00e0e07&|{+0#e000e06&@1| |s|u|b|h|e|a|d|e|r| |}@1|<+0#00e0e07&|/|h+0#af5f00255&|2|>+0#00e0e07&| +0#0000000&@34 +@12|{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@51 +@8|<+0#00e0e07&|/|h+0#af5f00255&|e|a|d|e|r|>+0#00e0e07&| +0#0000000&@57 +@75 +@8>{+0#0000e05&|#| |N|a|v|i|g|a|t|i|o|n| |e|x|a|m|p|l|e| |w|i|t|h| |f|o|r| |l|o@1|p| |#|}| +0#0000000&@28 +@8|<+0#00e0e07&|n+0#af5f00255&|a|v|>+0#00e0e07&| +0#0000000&@61 +@12|<+0#00e0e07&|u+0#af5f00255&|l|>+0#00e0e07&| +0#0000000&@58 +@16|{+0#e000e06&|%| |f+0#af5f00255&|o|r| +0#e000e06&|i|t|e|m| |i+0#af5f00255&|n| +0#e000e06&|n|a|v|i|g|a|t|i|o|n| |%|}| +0#0000000&@30 +@20|<+0#00e0e07&|l+0#af5f00255&|i| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|{@1| |l|o@1|p|.|i|n|d|e|x|0| |=@1| |c|u|r@1|e|n|t|_|p|a|g|e| |?| |'|a|c|t|i|v|e|'| |:| +|'@1| |}@1|"|>+0#00e0e07&| +0#0000000&@67 +@24|<+0#00e0e07&|a+0#af5f00255&| +0#00e0e07&|h+0#00e0003&|r|e|f|=+0#00e0e07&|"+0#e000002&|{@1| |i|t|e|m|.|u|r|l| |}@1|"|>+0#00e0e07&|{+8#e000e06&@1| |i|t|e|m|.|t|i|t|l|e| |}@1|<+0#00e0e07&|/|a+0#af5f00255&|>+0#00e0e07&| +0#0000000&@5 +@20|<+0#00e0e07&|/|l+0#af5f00255&|i|>+0#00e0e07&| +0#0000000&@49 +@16|{+0#e000e06&|%| |e+0#af5f00255&|n|d|f|o|r| +0#e000e06&|%|}| +0#0000000&@46 +@12|<+0#00e0e07&|/|u+0#af5f00255&|l|>+0#00e0e07&| +0#0000000&@57 +@8|<+0#00e0e07&|/|n+0#af5f00255&|a|v|>+0#00e0e07&| +0#0000000&@60 +@75 +@8|{+0#0000e05&|#| |M|a|i|n| |c|o|n|t|e|n|t| |s|e|c|t|i|o|n| |w|i|t|h| |v|a|r|i|o|u|s| |t|e|m|p|l|a|t|e| |f|e|a|t|u|r|e|s| |#|}| +0#0000000&@9 +@8|<+0#00e0e07&|m+0#af5f00255&|a|i|n|>+0#00e0e07&| +0#0000000&@60 +@57|3|7|,|9| @9|2|1|%| diff --git a/runtime/syntax/testdir/dumps/tera_03.dump b/runtime/syntax/testdir/dumps/tera_03.dump new file mode 100644 index 0000000000..f5637c70c0 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_03.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|<+0#00e0e07&|m+0#af5f00255&|a|i|n|>+0#00e0e07&| +0#0000000&@60 +@12|{+0#0000e05&|#| |C|o|n|d|i|t|i|o|n|a|l|s| |#|}| +0#0000000&@44 +@12|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|u|s|e|r| |%|}| +0#0000000&@49 +@16|<+0#00e0e07&|s+0#af5f00255&|e|c|t|i|o|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|w|e|l|c|o|m|e|"|>+0#00e0e07&| +0#0000000&@33 +@20|<+0#00e0e07&|h+0#af5f00255&|2|>+0#00e0e07&|W+0#e000e06&|e|l|c|o|m|e| |b|a|c|k|,| |{@1| |u|s|e|r|.|n|a|m|e| |}@1|!|<+0#00e0e07&|/|h+0#af5f00255&|2|>+0#00e0e07&| +0#0000000&@15 +@20><+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|L+0#0000000&|a|s|t| |l|o|g|i|n|:| |{+0#e000e06&@1| |u+0#00e0e07&|s|e|r|.+0#e000e06&|l+0#00e0e07&|a|s|t|_|l|o|g|i|n| +0#e000e06&||| |d|a|t|e|(|f+0#00e0e07&|o|r|m|a|t|=+0#e000e06&|"+0#e000002&|%|Y|-|%|m|- +|%|d|"|)+0#e000e06&| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@63 +@16|<+0#00e0e07&|/|s+0#af5f00255&|e|c|t|i|o|n|>+0#00e0e07&| +0#0000000&@48 +@12|{+0#e000e06&|%| |e+0#af5f00255&|l|i|f| +0#e000e06&|v|i|s|i|t|o|r|_|c|o|u|n|t| |>+0#af5f00255&| +0#e000e06&|0+0#e000002&| +0#e000e06&|%|}| +0#0000000&@34 +@16|<+0#00e0e07&|s+0#af5f00255&|e|c|t|i|o|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|w|e|l|c|o|m|e|"|>+0#00e0e07&| +0#0000000&@33 +@20|<+0#00e0e07&|h+0#af5f00255&|2|>+0#00e0e07&|W+0#e000e06&|e|l|c|o|m|e|,| |v|i|s|i|t|o|r|!|<+0#00e0e07&|/|h+0#af5f00255&|2|>+0#00e0e07&| +0#0000000&@28 +@20|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|Y+0#0000000&|o|u| |a|r|e| |v|i|s|i|t|o|r| |n|u|m|b|e|r| |{+0#e000e06&@1| |v+0#00e0e07&|i|s|i|t|o|r|_|c|o|u|n|t| +0#e000e06&|}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@5 +@16|<+0#00e0e07&|/|s+0#af5f00255&|e|c|t|i|o|n|>+0#00e0e07&| +0#0000000&@48 +@12|{+0#e000e06&|%| |e+0#af5f00255&|l|s|e| +0#e000e06&|%|}| +0#0000000&@52 +@16|<+0#00e0e07&|s+0#af5f00255&|e|c|t|i|o|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|w|e|l|c|o|m|e|"|>+0#00e0e07&| +0#0000000&@33 +@20|<+0#00e0e07&|h+0#af5f00255&|2|>+0#00e0e07&|W+0#e000e06&|e|l|c|o|m|e| |t|o| |o|u|r| |s|i|t|e|!|<+0#00e0e07&|/|h+0#af5f00255&|2|>+0#00e0e07&| +0#0000000&@25 +@16|<+0#00e0e07&|/|s+0#af5f00255&|e|c|t|i|o|n|>+0#00e0e07&| +0#0000000&@48 +@12|{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@51 +@75 +@57|5|4|,|2|1| @8|3|2|%| diff --git a/runtime/syntax/testdir/dumps/tera_04.dump b/runtime/syntax/testdir/dumps/tera_04.dump new file mode 100644 index 0000000000..127a258ab8 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_04.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +@12|{+0#0000e05&|#| |M|a|c|r|o| |d|e|f|i|n|i|t|i|o|n| |a|n|d| |u|s|a|g|e| |#|}| +0#0000000&@30 +@12|{+0#e000e06&|%| |m+0#af5f00255&|a|c|r|o| +0#e000e06&|r+0#00e0e07&|e|n|d|e|r|_|i|t|e|m|(+0#e000e06&|i|t|e|m|,| |f|e|a|t|u|r|e|d|=|f+0#e000002&|a|l|s|e|)+0#e000e06&| |%|}| +0#0000000&@17 +@16|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|i|t|e|m| |{@1| |f|e|a|t|u|r|e|d| |?| |'|f|e|a|t|u|r|e|d|'| |:| |'@1| |}@1|"|>+0#00e0e07&| +0#0000000&@7 +@20|<+0#00e0e07&|h+0#af5f00255&|3|>+0#00e0e07&|{+0#e000e06&@1| |i|t|e|m|.|t|i|t|l|e| |}@1|<+0#00e0e07&|/|h+0#af5f00255&|3|>+0#00e0e07&| +0#0000000&@29 +@20><+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|{+0#e000e06&@1| |i+0#00e0e07&|t|e|m|.+0#e000e06&|d+0#00e0e07&|e|s|c|r|i|p|t|i|o|n| +0#e000e06&||| |t|r|u|n|c|a|t|e|(|l+0#00e0e07&|e|n|g|t|h|=+0#e000e06&|1+0#e000002&|0@1|)+0#e000e06&| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@2 +@20|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|i|t|e|m|.|t|a|g|s| |%|}| +0#0000000&@36 +@24|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|t|a|g|s|"|>+0#00e0e07&| +0#0000000&@32 +@28|{+0#e000e06&|%| |f+0#af5f00255&|o|r| +0#e000e06&|t|a|g| |i+0#af5f00255&|n| +0#e000e06&|i|t|e|m|.|t|a|g|s| |%|}| +0#0000000&@20 +@32|<+0#00e0e07&|s+0#af5f00255&|p|a|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|t|a|g|"|>+0#00e0e07&|{+0#e000e06&@1| |t+0#00e0e07&|a|g| +0#e000e06&|}@1|<+0#00e0e07&|/|s+0#af5f00255&|p|a|n|>+0#00e0e07&| +0#0000000&@8 +@28|{+0#e000e06&|%| |e+0#af5f00255&|n|d|f|o|r| +0#e000e06&|%|}| +0#0000000&@34 +@24|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@44 +@20|{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@43 +@16|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@52 +@12|{+0#e000e06&|%| |e+0#af5f00255&|n|d|m|a|c|r|o| +0#e000e06&|r|e|n|d|e|r|_|i|t|e|m| |%|}| +0#0000000&@36 +@75 +@12|{+0#0000e05&|#| |I|t|e|m|s| |s|e|c|t|i|o|n| |w|i|t|h| |m|a|c|r|o| |u|s|a|g|e| |#|}| +0#0000000&@26 +@12|<+0#00e0e07&|s+0#af5f00255&|e|c|t|i|o|n| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|i|t|e|m|s|"|>+0#00e0e07&| +0#0000000&@39 +@16|<+0#00e0e07&|h+0#af5f00255&|2|>+0#00e0e07&|I+0#e000e06&|t|e|m|s| |(|{@1| |i|t|e|m|s| ||| |l|e|n|g|t|h| |}@1|)|<+0#00e0e07&|/|h+0#af5f00255&|2|>+0#00e0e07&| +0#0000000&@21 +@57|7|1|,|2|1| @8|4@1|%| diff --git a/runtime/syntax/testdir/dumps/tera_05.dump b/runtime/syntax/testdir/dumps/tera_05.dump new file mode 100644 index 0000000000..5a3d7a90e4 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_05.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@15|<+0#00e0e07&|h+0#af5f00255&|2|>+0#00e0e07&|I+0#e000e06&|t|e|m|s| |(|{@1| |i|t|e|m|s| ||| |l|e|n|g|t|h| |}@1|)|<+0#00e0e07&|/|h+0#af5f00255&|2|>+0#00e0e07&| +0#0000000&@21 +@75 +@16|{+0#e000e06&|%| |f+0#af5f00255&|o|r| +0#e000e06&|i|t|e|m| |i+0#af5f00255&|n| +0#e000e06&|i|t|e|m|s| |%|}| +0#0000000&@35 +@20|{+0#e000e06&@1| |s+0#00e0e07&|e|l|f|:+0#e000e06&@1|r+0#00e0e07&|e|n|d|e|r|_|i|t|e|m|(+0#e000e06&|i+0#00e0e07&|t|e|m|=+0#e000e06&|i+0#00e0e07&|t|e|m|,+0#e000e06&| |f+0#00e0e07&|e|a|t|u|r|e|d|=+0#e000e06&|i+0#00e0e07&|t|e|m|.+0#e000e06&|i+0#00e0e07&|d| +0#e000e06&|=+0#af5f00255&@1| +0#e000e06&|f+0#00e0e07&|e|a +|t|u|r|e|d|_|i|d|)+0#e000e06&| |}@1| +0#0000000&@62 +> @74 +@20|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|n+0#af5f00255&|o|t| +0#e000e06&|l|o@1|p|.|l|a|s|t| |%|}| +0#0000000&@32 +@24|<+0#00e0e07&|h+0#af5f00255&|r|>+0#00e0e07&| +0#0000000&@46 +@20|{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@43 +@16|{+0#e000e06&|%| |e+0#af5f00255&|n|d|f|o|r| +0#e000e06&|%|}| +0#0000000&@46 +@12|<+0#00e0e07&|/|s+0#af5f00255&|e|c|t|i|o|n|>+0#00e0e07&| +0#0000000&@52 +@75 +@12|{+0#0000e05&|#| |R|a|w| |c|o|n|t|e|n|t| |t|h|a|t| |s|h|o|u|l|d|n|'|t| |b|e| |p|r|o|c|e|s@1|e|d| |#|}| +0#0000000&@17 +@12|{|%| |r|a|w| |%|}| @53 +@16|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|e|x|a|m|p|l|e|"|>+0#00e0e07&| +0#0000000&@37 +@20|T|h|e| |s|y|n|t|a|x| |{@1| |v|a|r|i|a|b|l|e| |}@1| |w|i|l@1| |n|o|t| |b|e| |p|r|o|c|e|s@1|e|d| |i|n| |r|a|w| +|b|l|o|c|k|s|.| @67 +@20|N|e|i|t|h|e|r| |w|i|l@1| |{|%| |c|o|n|t|r|o|l| |%|}| |s|t|r|u|c|t|u|r|e|s|.| @16 +@16|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@52 +@57|8@1|,|0|-|1| @7|5|6|%| diff --git a/runtime/syntax/testdir/dumps/tera_06.dump b/runtime/syntax/testdir/dumps/tera_06.dump new file mode 100644 index 0000000000..96c2e2b85d --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_06.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@15|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@52 +@12|{|%| |e|n|d|r|a|w| |%|}| @50 +@75 +@12|{+0#0000e05&|#| |I|n|c|l|u|d|e|s| |#|}| +0#0000000&@48 +@12|{+0#e000e06&|%| |i+0#af5f00255&|n|c|l|u|d|e| +0#e000e06&|"+0#e000002&|p|a|r|t|i|a|l|s|/|f|o@1|t|e|r|.|t|e|r|a|"| +0#e000e06&|%|}| +0#0000000&@26 +> @74 +@12|{+0#0000e05&|#| |I|n|h|e|r|i|t|a|n|c|e| |e|x|a|m|p|l|e| |#|}| +0#0000000&@37 +@12|{+0#e000e06&|%| |b+0#af5f00255&|l|o|c|k| +0#e000e06&|c|o|n|t|e|n|t| |%|}| +0#0000000&@43 +@16|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000000&|h|i|s| |i|s| |t|h|e| |d|e|f|a|u|l|t| |c|o|n|t|e|n|t|.|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@23 +@12|{+0#e000e06&|%| |e+0#af5f00255&|n|d|b|l|o|c|k| +0#e000e06&|c|o|n|t|e|n|t| |%|}| +0#0000000&@40 +@75 +@12|{+0#0000e05&|#| |S|e|t| |v|a|r|i|a|b|l|e|s| |#|}| +0#0000000&@43 +@12|{+0#e000e06&|%| |s+0#af5f00255&|e|t| +0#e000e06&|t|e|x|t|_|c|o|l|o|r| |=| |d|a|r|k|_|m|o|d|e| |?| |"+0#e000002&|#|f@2|"| +0#e000e06&|:| |"+0#e000002&|#|3@2|"| +0#e000e06&|%|}| +0#0000000&@12 +@12|{+0#e000e06&|%| |s+0#af5f00255&|e|t| +0#e000e06&|i|t|e|m|s|_|c|o|u|n|t| |=| |i|t|e|m|s| ||| |l|e|n|g|t|h| |%|}| +0#0000000&@24 +@75 +@12|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|s+0#00e0003&|t|y|l|e|=+0#00e0e07&|"+0#e000002&|c|o|l|o|r|:| |{@1| |t|e|x|t|_|c|o|l|o|r| |}@1|"|>+0#00e0e07&| +0#0000000&@25 +@16|W|e| |h|a|v|e| |{+0#e000e06&@1| |i+0#00e0e07&|t|e|m|s|_|c|o|u|n|t| +0#e000e06&|}@1| +0#0000000&|i|t|e|m|s|.| @26 +@12|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@56 +@75 +@57|1|0|5|,|0|-|1| @6|6|7|%| diff --git a/runtime/syntax/testdir/dumps/tera_07.dump b/runtime/syntax/testdir/dumps/tera_07.dump new file mode 100644 index 0000000000..b7190d7341 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_07.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +@12|{+0#0000e05&|#| |F|i|l|t|e|r|s| |w|i|t|h| |c|o|m|p|l|e|x| |e|x|p|r|e|s@1|i|o|n|s| |#|}| +0#0000000&@24 +@12|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|{+0#e000e06&@1| |"+0#e000002&|H|e|l@1|o|,| |"| +0#e000e06&|~| |u+0#00e0e07&|s|e|r|.+0#e000e06&|n+0#00e0e07&|a|m|e| +0#e000e06&||| |d|e|f|a|u|l|t|(|v+0#00e0e07&|a|l|u|e|=+0#e000e06&|"+0#e000002&|G|u|e|s|t|"|)+0#e000e06&| ||| |u|p@1|e|r| |}@1 +|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@70 +@12|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|{+0#e000e06&@1| |i+0#00e0e07&|t|e|m|s| +0#e000e06&||| |f|i|l|t|e|r|(|a+0#00e0e07&|t@1|r|i|b|u|t|e|=+0#e000e06&|"+0#e000002&|f|e|a|t|u|r|e|d|"|,+0#e000e06&| |v+0#00e0e07&|a|l|u|e|=+0#e000e06&|t+0#e000002&|r|u|e|)+0#e000e06&| ||| |l|e|n|g|t|h +| |}@1| +0#0000000&|f|e|a|t|u|r|e|d| |i|t|e|m|s|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@52 +> @74 +@12|{+0#0000e05&|#| |W|i|t|h| |s|t|a|t|e|m|e|n|t| |#|}| +0#0000000&@42 +@12|{+0#e000e06&|%| |w+0#af5f00255&|i|t|h| +0#e000e06&|%|}| +0#0000000&@52 +@16|{+0#e000e06&|%| |s+0#af5f00255&|e|t| +0#e000e06&|l|o|c|a|l|_|v|a|r| |=| |"+0#e000002&|O|n|l|y| |v|i|s|i|b|l|e| |i|n| |t|h|i|s| |s|c|o|p|e|"| +0#e000e06&|%|}| +0#0000000&@8 +@16|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|{+0#e000e06&@1| |l+0#00e0e07&|o|c|a|l|_|v|a|r| +0#e000e06&|}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@36 +@12|{+0#e000e06&|%| |e+0#af5f00255&|n|d|w|i|t|h| +0#e000e06&|%|}| +0#0000000&@49 +@75 +@12|{+0#0000e05&|#| |M|a|t|h|e|m|a|t|i|c|a|l| |o|p|e|r|a|t|i|o|n|s| |#|}| +0#0000000&@33 +@12|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|m|a|t|h|"|>+0#00e0e07&| +0#0000000&@44 +@16|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|P+0#0000000&|r|i|c|e|:| |$|{+0#e000e06&@1| |p+0#00e0e07&|r|i|c|e| +0#e000e06&|}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@32 +@16|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000000&|a|x| |(|{+0#e000e06&@1| |t+0#00e0e07&|a|x|_|r|a|t|e| +0#e000e06&|*+0#af5f00255&| +0#e000e06&|1+0#e000002&|0@1| +0#e000e06&|}@1|%+0#0000000&|)|:| |$|{+0#e000e06&@1| |p+0#00e0e07&|r|i|c|e| +0#e000e06&|*+0#af5f00255&| +0#e000e06&|t+0#00e0e07&|a|x|_|r|a|t|e| +0#e000e06&|}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07& +| +0#0000000&@15|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000000&|o|t|a|l|:| |$|{+0#e000e06&@1| |p+0#00e0e07&|r|i|c|e| +0#e000e06&|*+0#af5f00255&| +0#e000e06&|(|1+0#e000002&| +0#e000e06&|++0#af5f00255&| +0#e000e06&|t+0#00e0e07&|a|x|_|r|a|t|e|)+0#e000e06&| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@15 +@12|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@56 +@57|1|2@1|,|0|-|1| @6|7|9|%| diff --git a/runtime/syntax/testdir/dumps/tera_08.dump b/runtime/syntax/testdir/dumps/tera_08.dump new file mode 100644 index 0000000000..1231ed1130 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_08.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@11|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@56 +@75 +@12|{+0#0000e05&|#| |B|o@1|l|e|a|n| |o|p|e|r|a|t|i|o|n|s| |#|}| +0#0000000&@38 +@12|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|u|s|e|r| |a+0#af5f00255&|n|d| +0#e000e06&|u|s|e|r|.|i|s|_|a|d|m|i|n| |o+0#af5f00255&|r| +0#e000e06&|s|u|p|e|r|_|u|s|e|r| |%|}| +0#0000000&@17 +@16|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|a|d|m|i|n|-|p|a|n|e|l|"|>+0#00e0e07&|A+0#0000000&|d|m|i|n| |p|a|n|e|l|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@16 +@12>{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@51 +@8|<+0#00e0e07&|/|m+0#af5f00255&|a|i|n|>+0#00e0e07&| +0#0000000&@59 +@75 +@8|{+0#0000e05&|#| |F|o@1|t|e|r| |s|e|c|t|i|o|n| |w|i|t|h| |f|i|l|t|e|r|s| |a|n|d| |i|n|c|l|u|d|e|s| |#|}| +0#0000000&@20 +@8|<+0#00e0e07&|f+0#af5f00255&|o@1|t|e|r|>+0#00e0e07&| +0#0000000&@58 +@12|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|&+0#e000e06&|c|o|p|y|;| +0#0000000&|{+0#e000e06&@1| |c+0#00e0e07&|u|r@1|e|n|t|_|y|e|a|r| +0#e000e06&|}@1| +0#0000000&|{+0#e000e06&@1| |c+0#00e0e07&|o|m|p|a|n|y|_|n|a|m|e| +0#e000e06&||| |d|e|f|a|u|l|t|(|v+0#00e0e07&|a|l|u|e|=+0#e000e06&|"+0#e000002&|O +|u|r| |C|o|m|p|a|n|y|"|)+0#e000e06&| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@55 +@75 +@12|{+0#e000e06&|%| |i+0#af5f00255&|f| +0#e000e06&|d|e|b|u|g| |%|}| +0#0000000&@48 +@16|<+0#00e0e07&|d+0#af5f00255&|i|v| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|d|e|b|u|g|-|i|n|f|o|"|>+0#00e0e07&| +0#0000000&@34 +@20|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|R+0#0000000&|e|n|d|e|r| |t|i|m|e|:| |{+0#e000e06&@1| |r+0#00e0e07&|e|n|d|e|r|_|t|i|m|e| +0#e000e06&|}@1|m+0#0000000&|s|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@15 +@20|<+0#00e0e07&|p+0#af5f00255&|>+0#00e0e07&|T+0#0000000&|e|m|p|l|a|t|e| |v|e|r|s|i|o|n|:| |{+0#e000e06&@1| |v+0#00e0e07&|e|r|s|i|o|n| +0#e000e06&|}@1|<+0#00e0e07&|/|p+0#af5f00255&|>+0#00e0e07&| +0#0000000&@16 +@16|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@52 +@12|{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@51 +@57|1|3|9|,|1|3| @7|9|0|%| diff --git a/runtime/syntax/testdir/dumps/tera_09.dump b/runtime/syntax/testdir/dumps/tera_09.dump new file mode 100644 index 0000000000..55cb518363 --- /dev/null +++ b/runtime/syntax/testdir/dumps/tera_09.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@11|{+0#e000e06&|%| |e+0#af5f00255&|n|d|i|f| +0#e000e06&|%|}| +0#0000000&@51 +@8|<+0#00e0e07&|/|f+0#af5f00255&|o@1|t|e|r|>+0#00e0e07&| +0#0000000&@57 +@4|<+0#00e0e07&|/|d+0#af5f00255&|i|v|>+0#00e0e07&| +0#0000000&@64 +@75 +@4|<+0#00e0e07&|s+0#af5f00255&|c|r|i|p|t|>+0#00e0e07&| +0#0000000&@62 +| +0#e000e06&@7>c+0#af5f00255&|o|n|s|t| +0#e000e06&|a|p@1|D|a|t|a| |=| |{+0#00e0e07&| +0#0000000&@49 +| +0#e000e06&@11|"+0#e000002&|u|s|e|r|"|:+0#e000e06&| |{+0#00e0e07&|%+0#e000e06&| |i+0#af5f00255&|f| +0#e000e06&|u|s|e|r| |%|}+0#00e0e07&|{@1| +0#e000e06&|u|s|e|r| ||| |j|s|o|n|_|e|n|c|o|d|e|(+0#0000000&|)| +0#e000e06&|}+0#00e0e07&@1|{|%+0#e000e06&| |e+0#af5f00255&|l|s|e| +0#e000e06&|%|}+0#00e0e07&|n+0#af5f00255&|u|l@1|{+0#00e0e07&|%+0#e000e06& +| |e|n|d|i|f| |%|}+0#00e0e07&|,+0#e000e06&| +0#0000000&@64 +| +0#e000e06&@11|"+0#e000002&|s|e|t@1|i|n|g|s|"|:+0#e000e06&| |{+0#00e0e07&| +0#0000000&@49 +| +0#e000e06&@15|"+0#e000002&|t|h|e|m|e|"|:+0#e000e06&| |"+0#e000002&|{@1| |t|h|e|m|e| ||| |d|e|f|a|u|l|t|(|v|a|l|u|e|=|"|l+0#e000e06&|i|g|h|t|"+0#e000002&|)| |}@1|"|,+0#e000e06&| +0#0000000&@10 +| +0#e000e06&@15|"+0#e000002&|n|o|t|i|f|i|c|a|t|i|o|n|s|"|:+0#e000e06&| |{+0#00e0e07&@1| +0#e000e06&|n|o|t|i|f|i|c|a|t|i|o|n|s|_|e|n|a|b|l|e|d| ||| |s+0#00e0003&|t|r|i|n|g| +0#e000e06&||| |l|o|w|e|r| +|}+0#00e0e07&@1| +0#0000000&@72 +| +0#e000e06&@11|}+0#00e0e07&| +0#0000000&@61 +| +0#e000e06&@7|}+0#00e0e07&|;+0#e000e06&| +0#0000000&@64 +| +0#e000e06&@3|<+0#00e0e07&|/|s+0#af5f00255&|c|r|i|p|t|>+0#00e0e07&| +0#0000000&@61 +|<+0#00e0e07&|/|b+0#af5f00255&|o|d|y|>+0#00e0e07&| +0#0000000&@67 +|<+0#00e0e07&|/|h+0#af5f00255&|t|m|l|>+0#00e0e07&| +0#0000000&@67 +|~+0#4040ff13&| @73 +|~| @73 +| +0#0000000&@56|1|5|6|,|9| @8|B|o|t| diff --git a/runtime/syntax/testdir/input/tera.tera b/runtime/syntax/testdir/input/tera.tera new file mode 100644 index 0000000000..161793c963 --- /dev/null +++ b/runtime/syntax/testdir/input/tera.tera @@ -0,0 +1,165 @@ + + + + + + {{ page_title | default(value="Tera Test") }} + {% if include_styles %} + + {% endif %} + + +
+ {# Header Section with variable interpolation #} +
+

{{ header_text | upper }}

+ {% if subheader %} +

{{ subheader }}

+ {% endif %} +
+ + {# Navigation example with for loop #} + + + {# Main content section with various template features #} +
+ {# Conditionals #} + {% if user %} +
+

Welcome back, {{ user.name }}!

+

Last login: {{ user.last_login | date(format="%Y-%m-%d") }}

+
+ {% elif visitor_count > 0 %} +
+

Welcome, visitor!

+

You are visitor number {{ visitor_count }}

+
+ {% else %} +
+

Welcome to our site!

+
+ {% endif %} + + {# Macro definition and usage #} + {% macro render_item(item, featured=false) %} + + {% endmacro render_item %} + + {# Items section with macro usage #} +
+

Items ({{ items | length }})

+ + {% for item in items %} + {{ self::render_item(item=item, featured=item.id == featured_id) }} + + {% if not loop.last %} +
+ {% endif %} + {% endfor %} +
+ + {# Raw content that shouldn't be processed #} + {% raw %} +
+ The syntax {{ variable }} will not be processed in raw blocks. + Neither will {% control %} structures. +
+ {% endraw %} + + {# Includes #} + {% include "partials/footer.tera" %} + + {# Inheritance example #} + {% block content %} +

This is the default content.

+ {% endblock content %} + + {# Set variables #} + {% set text_color = dark_mode ? "#fff" : "#333" %} + {% set items_count = items | length %} + +
+ We have {{ items_count }} items. +
+ + {# Filters with complex expressions #} +

{{ "Hello, " ~ user.name | default(value="Guest") | upper }}

+

{{ items | filter(attribute="featured", value=true) | length }} featured items

+ + {# With statement #} + {% with %} + {% set local_var = "Only visible in this scope" %} +

{{ local_var }}

+ {% endwith %} + + {# Mathematical operations #} +
+

Price: ${{ price }}

+

Tax ({{ tax_rate * 100 }}%): ${{ price * tax_rate }}

+

Total: ${{ price * (1 + tax_rate) }}

+
+ + {# Boolean operations #} + {% if user and user.is_admin or super_user %} +
Admin panel
+ {% endif %} +
+ + {# Footer section with filters and includes #} +
+

© {{ current_year }} {{ company_name | default(value="Our Company") }}

+ + {% if debug %} +
+

Render time: {{ render_time }}ms

+

Template version: {{ version }}

+
+ {% endif %} +
+
+ + + + diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 521c0f60da..754fc8161a 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -804,7 +804,7 @@ def s:GetFilenameChecks(): dict> teal: ['file.tl'], templ: ['file.templ'], template: ['file.tmpl'], - tera: ['file.tera'], + tera: ['file.tera', 'file.toml.tera', 'file.html.tera', 'file.css.tera'], teraterm: ['file.ttl'], terminfo: ['file.ti'], 'terraform-vars': ['file.tfvars'], diff --git a/src/version.c b/src/version.c index 7851f79728..b0cec30565 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1188, /**/ 1187, /**/