You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2015/12/19 15:23:14 UTC
[5/8] incubator-freemarker git commit: (More AST location information
tests)
(More AST location information tests)
Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/f08867b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/f08867b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/f08867b6
Branch: refs/heads/2.3
Commit: f08867b604399abf9b0de8a6c89e1cbc560b300b
Parents: cd6857c
Author: ddekany <dd...@apache.org>
Authored: Fri Dec 18 21:41:16 2015 +0100
Committer: ddekany <dd...@apache.org>
Committed: Fri Dec 18 21:41:16 2015 +0100
----------------------------------------------------------------------
.../resources/freemarker/core/ast-locations.ast | 52 +++++++++++++++++++-
.../resources/freemarker/core/ast-locations.ftl | 10 +++-
2 files changed, 60 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/f08867b6/src/test/resources/freemarker/core/ast-locations.ast
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/core/ast-locations.ast b/src/test/resources/freemarker/core/ast-locations.ast
index 1d94637..fb8974a 100644
--- a/src/test/resources/freemarker/core/ast-locations.ast
+++ b/src/test/resources/freemarker/core/ast-locations.ast
@@ -1,4 +1,4 @@
-#mixed_content // f.c.MixedContent; Location 1:1-10:33
+#mixed_content // f.c.MixedContent; Location 1:1-18:8
#if // f.c.ConditionalBlock; Location 1:1-1:15
- condition: exp // f.c.Identifier; Location 1:6-1:8
- AST-node subtype: "0" // Integer
@@ -85,3 +85,53 @@
#recover // f.c.RecoveryBlock; Location 10:12-10:22
#text // f.c.TextBlock; Location 10:22-10:22
- content: "1" // String
+ #text // f.c.TextBlock; Location 10:34-10:34
+ - content: "\n" // String
+ #list // f.c.IteratorBlock; Location 11:1-11:22
+ - list source: s // f.c.Identifier; Location 11:8-11:8
+ - target loop variable: "i" // String
+ #list // f.c.IteratorBlock; Location 12:1-12:23
+ - list source: s // f.c.Identifier; Location 12:8-12:8
+ - target loop variable: "i" // String
+ #text // f.c.TextBlock; Location 12:15-12:15
+ - content: "1" // String
+ #text // f.c.TextBlock; Location 12:24-12:24
+ - content: "\n" // String
+ #list // f.c.IteratorBlock; Location 13:1-13:28
+ - list source: s // f.c.Identifier; Location 13:8-13:8
+ - target loop variable: "i" // String
+ #sep // f.c.Sep; Location 13:15-13:20
+ #list // f.c.IteratorBlock; Location 14:1-14:30
+ - list source: s // f.c.Identifier; Location 14:8-14:8
+ - target loop variable: "i" // String
+ #text // f.c.TextBlock; Location 14:15-14:15
+ - content: "1" // String
+ #sep // f.c.Sep; Location 14:16-14:22
+ #text // f.c.TextBlock; Location 14:22-14:22
+ - content: "1" // String
+ #text // f.c.TextBlock; Location 14:31-14:31
+ - content: "\n" // String
+ #list // f.c.IteratorBlock; Location 15:1-15:45
+ - list source: s // f.c.Identifier; Location 15:8-15:8
+ #items // f.c.Items; Location 15:10-15:37
+ - target loop variable: "i" // String
+ #sep // f.c.Sep; Location 15:23-15:28
+ #list // f.c.IteratorBlock; Location 16:1-16:49
+ - list source: s // f.c.Identifier; Location 16:8-16:8
+ #text // f.c.TextBlock; Location 16:10-16:10
+ - content: "1" // String
+ #items // f.c.Items; Location 16:11-16:40
+ - target loop variable: "i" // String
+ #text // f.c.TextBlock; Location 16:24-16:24
+ - content: "1" // String
+ #sep // f.c.Sep; Location 16:25-16:31
+ #text // f.c.TextBlock; Location 16:31-16:31
+ - content: "1" // String
+ #text // f.c.TextBlock; Location 16:41-16:41
+ - content: "1" // String
+ #text // f.c.TextBlock; Location 16:50-17:2
+ - content: "\n1\n" // String
+ ${...} // f.c.DollarVariable; Location 18:1-18:8
+ - content: + // f.c.AddConcatExpression; Location 18:3-18:7
+ - left-hand operand: x // f.c.Identifier; Location 18:3-18:3
+ - right-hand operand: y // f.c.Identifier; Location 18:7-18:7
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/f08867b6/src/test/resources/freemarker/core/ast-locations.ftl
----------------------------------------------------------------------
diff --git a/src/test/resources/freemarker/core/ast-locations.ftl b/src/test/resources/freemarker/core/ast-locations.ftl
index cecc19e..6f299c4 100644
--- a/src/test/resources/freemarker/core/ast-locations.ftl
+++ b/src/test/resources/freemarker/core/ast-locations.ftl
@@ -7,4 +7,12 @@
<#if exp><#elseif exp></#if>
<#if exp><#elseif exp>1</#if>
<#attempt><#recover></#attempt>
-<#attempt>1<#recover>1</#attempt>
\ No newline at end of file
+<#attempt>1<#recover>1</#attempt>
+<#list s as i></#list>
+<#list s as i>1</#list>
+<#list s as i><#sep></#list>
+<#list s as i>1<#sep>1</#list>
+<#list s><#items as i><#sep></#items></#list>
+<#list s>1<#items as i>1<#sep>1</#items>1</#list>
+1
+${x + y}
\ No newline at end of file