-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: fix tests and refactor language definition
- Loading branch information
Showing
10 changed files
with
72 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
test/markup/handlebars/block-expression-variants-as-path-segment.expect.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<span class="xml">Block expression variants with literal segments in paths: | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">abc</span> abcd.[lite"'ral}}segment] }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">abc}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">abc</span> abcd.[lite"'ral}}segment] }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">abc</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">abc</span> abcd."lite]'ral}}segment" }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">abc}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">abc</span> abcd."lite]'ral}}segment" }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">abc</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">abc</span> abcd.'lite]"ral}}segment' }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">abc}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">abc</span> abcd.'lite]"ral}}segment' }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">abc</span>}}</span><span class="xml"> | ||
... | ||
Done | ||
</span> |
12 changes: 6 additions & 6 deletions
12
test/markup/handlebars/block-expression-variants-in-helper-name.expect.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<span class="xml">Block expression variants with literal segments in helper name: | ||
|
||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">[ab}}c]</span> param }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">[ab}}c]}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">[ab}}c]</span> param }}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">[ab}}c]</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">'ab}}c'</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">'ab}}c'}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">'ab}}c'</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">'ab}}c'</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">"ab}}c"</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">"ab}}c"}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">"ab}}c"</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">"ab}}c"</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">""</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">""}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">""</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">""</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">''</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">''}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">''</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">''</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">[]</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">[]}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">[]</span> param}}</span><span class="xml">a</span><span class="hljs-template-tag">{{/<span class="hljs-name">[]</span>}}</span><span class="xml"> | ||
... | ||
Done | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<span class="xml">Block parameters (using "x as | y |"): | ||
|
||
</span><span class="hljs-template-tag">{{#<span class="hljs-name"><span class="hljs-built_in">each</span></span> filter <span class="hljs-keyword">as</span> | value index|}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name"><span class="hljs-built_in">each</span>}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name"><span class="hljs-built_in">each</span></span> filter <span class="hljs-keyword">as</span> | value index|}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name"><span class="hljs-built_in">each</span></span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name"><span class="hljs-built_in">with</span></span> as <span class="hljs-keyword">as</span> | as |}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name"><span class="hljs-built_in">with</span>}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name"><span class="hljs-built_in">with</span></span> as <span class="hljs-keyword">as</span> | as |}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name"><span class="hljs-built_in">with</span></span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name"><span class="hljs-built_in">with</span></span> (<span class="hljs-name"><span class="hljs-built_in">lookup</span></span> 'abc') <span class="hljs-keyword">as</span> | as |}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name"><span class="hljs-built_in">with</span>}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name"><span class="hljs-built_in">with</span></span> (<span class="hljs-name"><span class="hljs-built_in">lookup</span></span> 'abc') <span class="hljs-keyword">as</span> | as |}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name"><span class="hljs-built_in">with</span></span>}}</span><span class="xml"> | ||
... | ||
Done | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<span class="xml">Simple block with parameters: | ||
|
||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">blockHelper</span> param1 param2}}</span><span class="xml">block content</span><span class="hljs-template-tag">{{/<span class="hljs-name">blockHelper}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">blockHelper</span> param1 param2}}</span><span class="xml">block content</span><span class="hljs-template-tag">{{/<span class="hljs-name">blockHelper</span>}}</span><span class="xml"> | ||
... | ||
Done | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<span class="xml">Simple Block: | ||
|
||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">block</span>}}</span><span class="xml">block content</span><span class="hljs-template-tag">{{/<span class="hljs-name">block}}</span></span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">block</span>}}</span><span class="xml">block content</span><span class="hljs-template-tag">{{/<span class="hljs-name">block</span>}}</span><span class="xml"> | ||
... | ||
Done | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<span class="xml">Complex combinations: | ||
|
||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">with.in.path</span> (<span class="hljs-name">helper</span> abc abc=abc cde=(<span class="hljs-name">helper</span> xzx=xzx))}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name">with.in.path</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{#<span class="hljs-name">with.in.path</span> (<span class="hljs-name">helper</span> abc abc='ab}}' (<span class="hljs-name"><span class="hljs-built_in">log</span></span> x)))}}</span><span class="xml"> </span><span class="hljs-template-tag">{{/<span class="hljs-name">with.in.path</span>}}</span><span class="xml"> | ||
... | ||
Done | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Complex combinations: | ||
|
||
{{#with.in.path (helper abc abc=abc cde=(helper xzx=xzx))}} {{/with.in.path}} | ||
... | ||
{{#with.in.path (helper abc abc='ab}}' (log x)))}} {{/with.in.path}} | ||
... | ||
Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<span class="xml">Raw blocks: | ||
|
||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span>}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw}}}}</span></span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span>}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw</span>}}}}</span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span> param}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw}}}}</span></span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span> param}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw</span>}}}}</span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span> key=value}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw}}}}</span></span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span> key=value}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw</span>}}}}</span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
... | ||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span> (<span class="hljs-name">helper</span> param) key=value}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw}}}}</span></span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
</span><span class="hljs-template-tag">{{{{#<span class="hljs-name">raw</span> (<span class="hljs-name">helper</span> param) key=value}}}}</span><span class="xml"> {{verbatim}} content </span><span class="hljs-template-tag">{{{{/<span class="hljs-name">raw</span>}}}}</span><span class="xml"> </span><span class="hljs-template-variable">{{<span class="hljs-name">var</span>}}</span><span class="xml"> | ||
... | ||
Done | ||
</span> |