freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [33/50] incubator-freemarker git commit: Legacy <#call m> haven't set the source code position of m.
Date Sat, 05 Aug 2017 14:26:53 GMT
Legacy <#call m> haven't set the source code position of m.


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/6f0283d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/6f0283d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/6f0283d7

Branch: refs/heads/2.3
Commit: 6f0283d72847aca5d53277c4659c2f1275c7c667
Parents: 1dba510
Author: ddekany <ddekany@apache.org>
Authored: Sun Jul 9 00:36:18 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Sun Jul 9 00:38:26 2017 +0200

----------------------------------------------------------------------
 src/main/javacc/FTL.jj | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/6f0283d7/src/main/javacc/FTL.jj
----------------------------------------------------------------------
diff --git a/src/main/javacc/FTL.jj b/src/main/javacc/FTL.jj
index fb6106d..385bbea 100644
--- a/src/main/javacc/FTL.jj
+++ b/src/main/javacc/FTL.jj
@@ -3432,11 +3432,14 @@ TemplateElement Call() :
     Token start, end, id;
     HashMap namedArgs = null;
     ArrayList positionalArgs = null;
-    String macroName= null;
+    Identifier macroName= null;
 }
 {
     start = <CALL>
-    id = <ID> { macroName = id.image; }
+    id = <ID> {
+        macroName = new Identifier(id.image);
+        macroName.setLocation(template, id, id);
+    }
     (
         LOOKAHEAD(<ID><EQUALS>)
         namedArgs = NamedArgs()
@@ -3454,9 +3457,9 @@ TemplateElement Call() :
     {
         UnifiedCall result = null;
         if (positionalArgs != null) {
-            result = new UnifiedCall(new Identifier(macroName), positionalArgs, TemplateElements.EMPTY,
null);
+            result = new UnifiedCall(macroName, positionalArgs, TemplateElements.EMPTY, null);
         } else {
-            result = new UnifiedCall(new Identifier(macroName), namedArgs, TemplateElements.EMPTY,
null);
+            result = new UnifiedCall(macroName, namedArgs, TemplateElements.EMPTY, null);
         }
         result.legacySyntax = true;
         result.setLocation(template, start, end);


Mime
View raw message