[1/7] incubator-freemarker git commit: (Minor internal renaming in FTL.jj)
Repository: incubator-freemarker Updated Branches: refs/heads/2.3 edefaa2f6 -> 17480993a (Minor internal renaming in FTL.jj) Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/355a09a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/355a09a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/355a09a2 Branch: refs/heads/2.3 Commit: 355a09a21ee5daf514b1d90ef36751e0badf411a Parents: 0129453 Author: ddekanyAuthored: Mon Mar 19 23:37:45 2018 +0100 Committer: ddekany Committed: Mon Mar 19 23:37:45 2018 +0100 -- src/main/javacc/FTL.jj | 164 ++-- 1 file changed, 82 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/355a09a2/src/main/javacc/FTL.jj -- diff --git a/src/main/javacc/FTL.jj b/src/main/javacc/FTL.jj index 630ef39..d1ab33d 100644 --- a/src/main/javacc/FTL.jj +++ b/src/main/javacc/FTL.jj @@ -628,7 +628,7 @@ TOKEN_MGR_DECLS: boolean strictSyntaxMode, squBracTagSyntax, autodetectTagSyntax, -directiveSyntaxEstablished, +tagSyntaxEstablished, inInvocation; int interpolationSyntax; int initialNamingConvention; @@ -644,7 +644,7 @@ TOKEN_MGR_DECLS: // FreeMarker directives must start with <#. It also handles // tag syntax detection. If you update this logic, take a look // at the UNKNOWN_DIRECTIVE token too. -private void strictSyntaxCheck(Token tok, int tokenNamingConvention, int newLexState) { +private void handleTagSyntaxAndSwitch(Token tok, int tokenNamingConvention, int newLexState) { final String image = tok.image; // Non-strict syntax (deprecated) only supports legacy naming convention. @@ -657,7 +657,7 @@ TOKEN_MGR_DECLS: } char firstChar = image.charAt(0); -if (autodetectTagSyntax && !directiveSyntaxEstablished) { +if (autodetectTagSyntax && !tagSyntaxEstablished) { squBracTagSyntax = (firstChar == '['); } if ((firstChar == '[' && !squBracTagSyntax) || (firstChar == '<' && squBracTagSyntax)) { @@ -682,7 +682,7 @@ TOKEN_MGR_DECLS: } // We only get here if this is a strict FTL tag. -directiveSyntaxEstablished = true; +tagSyntaxEstablished = true; if (incompatibleImprovements >= _TemplateAPI.VERSION_INT_2_3_28 || interpolationSyntax == SQUARE_BRACKET_INTERPOLATION_SYNTAX) { @@ -751,8 +751,8 @@ TOKEN_MGR_DECLS: /** * Used for tags whose name isn't affected by naming convention. */ -private void strictSyntaxCheck(Token tok, int newLexState) { -strictSyntaxCheck(tok, Configuration.AUTO_DETECT_NAMING_CONVENTION, newLexState); +private void handleTagSyntaxAndSwitch(Token tok, int newLexState) { +handleTagSyntaxAndSwitch(tok, Configuration.AUTO_DETECT_NAMING_CONVENTION, newLexState); } private boolean isStrictTag(String image) { @@ -788,7 +788,7 @@ TOKEN_MGR_DECLS: private void unifiedCall(Token tok) { char firstChar = tok.image.charAt(0); -if (autodetectTagSyntax && !directiveSyntaxEstablished) { +if (autodetectTagSyntax && !tagSyntaxEstablished) { squBracTagSyntax = (firstChar == '['); } if (squBracTagSyntax && firstChar == '<') { @@ -799,7 +799,7 @@ TOKEN_MGR_DECLS: tok.kind = STATIC_TEXT_NON_WS; return; } -directiveSyntaxEstablished = true; +tagSyntaxEstablished = true; SwitchTo(NO_SPACE_EXPRESSION); } @@ -881,9 +881,9 @@ TOKEN_MGR_DECLS: } private void ftlHeader(Token matchedToken) { -if (!directiveSyntaxEstablished) { +if (!tagSyntaxEstablished) { squBracTagSyntax = matchedToken.image.charAt(0) == '['; -directiveSyntaxEstablished = true; +tagSyntaxEstablished = true; autodetectTagSyntax = false; } String img = matchedToken.image; @@ -918,168 +918,168 @@ TOKEN: /* * ATTENTION: Update _CoreAPI.*_BUILT_IN_DIRECTIVE_NAMES if you add new directives! */ - "attempt" > { strictSyntaxCheck(matchedToken, DEFAULT); } + "attempt" > { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); } | - "recover" > { strictSyntaxCheck(matchedToken, DEFAULT); } + "recover" > { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); } | - "if" > { strictSyntaxCheck(matchedToken, FM_EXPRESSION); } + "if" > {
incubator-freemarker git commit: (Minor internal renaming in FTL.jj)
Repository: incubator-freemarker Updated Branches: refs/heads/2.3-gae 01294537b -> 355a09a21 (Minor internal renaming in FTL.jj) Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/355a09a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/355a09a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/355a09a2 Branch: refs/heads/2.3-gae Commit: 355a09a21ee5daf514b1d90ef36751e0badf411a Parents: 0129453 Author: ddekanyAuthored: Mon Mar 19 23:37:45 2018 +0100 Committer: ddekany Committed: Mon Mar 19 23:37:45 2018 +0100 -- src/main/javacc/FTL.jj | 164 ++-- 1 file changed, 82 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/355a09a2/src/main/javacc/FTL.jj -- diff --git a/src/main/javacc/FTL.jj b/src/main/javacc/FTL.jj index 630ef39..d1ab33d 100644 --- a/src/main/javacc/FTL.jj +++ b/src/main/javacc/FTL.jj @@ -628,7 +628,7 @@ TOKEN_MGR_DECLS: boolean strictSyntaxMode, squBracTagSyntax, autodetectTagSyntax, -directiveSyntaxEstablished, +tagSyntaxEstablished, inInvocation; int interpolationSyntax; int initialNamingConvention; @@ -644,7 +644,7 @@ TOKEN_MGR_DECLS: // FreeMarker directives must start with <#. It also handles // tag syntax detection. If you update this logic, take a look // at the UNKNOWN_DIRECTIVE token too. -private void strictSyntaxCheck(Token tok, int tokenNamingConvention, int newLexState) { +private void handleTagSyntaxAndSwitch(Token tok, int tokenNamingConvention, int newLexState) { final String image = tok.image; // Non-strict syntax (deprecated) only supports legacy naming convention. @@ -657,7 +657,7 @@ TOKEN_MGR_DECLS: } char firstChar = image.charAt(0); -if (autodetectTagSyntax && !directiveSyntaxEstablished) { +if (autodetectTagSyntax && !tagSyntaxEstablished) { squBracTagSyntax = (firstChar == '['); } if ((firstChar == '[' && !squBracTagSyntax) || (firstChar == '<' && squBracTagSyntax)) { @@ -682,7 +682,7 @@ TOKEN_MGR_DECLS: } // We only get here if this is a strict FTL tag. -directiveSyntaxEstablished = true; +tagSyntaxEstablished = true; if (incompatibleImprovements >= _TemplateAPI.VERSION_INT_2_3_28 || interpolationSyntax == SQUARE_BRACKET_INTERPOLATION_SYNTAX) { @@ -751,8 +751,8 @@ TOKEN_MGR_DECLS: /** * Used for tags whose name isn't affected by naming convention. */ -private void strictSyntaxCheck(Token tok, int newLexState) { -strictSyntaxCheck(tok, Configuration.AUTO_DETECT_NAMING_CONVENTION, newLexState); +private void handleTagSyntaxAndSwitch(Token tok, int newLexState) { +handleTagSyntaxAndSwitch(tok, Configuration.AUTO_DETECT_NAMING_CONVENTION, newLexState); } private boolean isStrictTag(String image) { @@ -788,7 +788,7 @@ TOKEN_MGR_DECLS: private void unifiedCall(Token tok) { char firstChar = tok.image.charAt(0); -if (autodetectTagSyntax && !directiveSyntaxEstablished) { +if (autodetectTagSyntax && !tagSyntaxEstablished) { squBracTagSyntax = (firstChar == '['); } if (squBracTagSyntax && firstChar == '<') { @@ -799,7 +799,7 @@ TOKEN_MGR_DECLS: tok.kind = STATIC_TEXT_NON_WS; return; } -directiveSyntaxEstablished = true; +tagSyntaxEstablished = true; SwitchTo(NO_SPACE_EXPRESSION); } @@ -881,9 +881,9 @@ TOKEN_MGR_DECLS: } private void ftlHeader(Token matchedToken) { -if (!directiveSyntaxEstablished) { +if (!tagSyntaxEstablished) { squBracTagSyntax = matchedToken.image.charAt(0) == '['; -directiveSyntaxEstablished = true; +tagSyntaxEstablished = true; autodetectTagSyntax = false; } String img = matchedToken.image; @@ -918,168 +918,168 @@ TOKEN: /* * ATTENTION: Update _CoreAPI.*_BUILT_IN_DIRECTIVE_NAMES if you add new directives! */ - "attempt" > { strictSyntaxCheck(matchedToken, DEFAULT); } + "attempt" > { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); } | - "recover" > { strictSyntaxCheck(matchedToken, DEFAULT); } + "recover" > { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); } | - "if" > { strictSyntaxCheck(matchedToken, FM_EXPRESSION); } + "if" > {