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 <[email protected]> Authored: Sun Jul 9 00:36:18 2017 +0200 Committer: ddekany <[email protected]> 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);
