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 2019/03/06 07:21:07 UTC

[freemarker] branch 2.3 updated (5c3cb46 -> c3cedd4)

This is an automated email from the ASF dual-hosted git repository.

ddekany pushed a change to branch 2.3
in repository https://gitbox.apache.org/repos/asf/freemarker.git.


    from 5c3cb46  Merge branch '2.3-gae' into 2.3
     new 5f8450c  (Some code cleanup around BuiltInWithParseTimeParameters.)
     new a01b698  fix typo 'namesoace' to 'namespace'
     new 2fa4f59  Merge pull request #56 from ILyaCyclone/2.3-gae
     new 8783907  Some code cleanup, mostly around function and macro calls. Also added generic parameters at some places.
     new 7eeeea1  (SequenceIterator to be internally usable on its own)
     new 7e4ab15  Added "local lambdas" to parser, which look like Java lambda-s, but are only allowed as parameters in certain built-ins, as they can't work outside the variable scope where they were created. To added new built-ins, ?filter(...) and ?map(...) to try the concept. These can get a "local lambda", or an #ftl function, or a method as parameter. These built-ins support the lazy processing of elements when they are the child of an AST node that explicitly enables that (for now  [...]
     new 0635b53  Fixed issue with local lambdas and #list: The visibility scope of loop variables were wider than necessary, which now become visible, because the lambda applied on the listed value is possibly evaluated lazily after the nested content of #list was already executed for the first iteration, and then the lambda saw the loop variables from the previous iteration. As the lambda expression is outside the nested content of #list, it should never see the loop variables of the sa [...]
     new c3cedd4  Merge remote-tracking branch 'origin/2.3-gae' into 2.3

The 2313 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/java/freemarker/core/BuiltIn.java         |  18 +-
 .../freemarker/core/BuiltInForLoopVariable.java    |   2 +-
 .../core/BuiltInWithParseTimeParameters.java       |  34 +-
 .../java/freemarker/core/BuiltInsForSequences.java | 345 ++++++++++++++++++++-
 ...ters.java => BuiltInsWithLazyConditionals.java} |  34 +-
 .../freemarker/core/CollectionAndSequence.java     |  19 --
 src/main/java/freemarker/core/Environment.java     | 131 +++++++-
 src/main/java/freemarker/core/Expression.java      |  14 +-
 ...ression.java => ExpressionWithFixedResult.java} |  77 ++---
 src/main/java/freemarker/core/Items.java           |   2 +-
 src/main/java/freemarker/core/IteratorBlock.java   | 231 ++++++++------
 src/main/java/freemarker/core/ListLiteral.java     |   4 +-
 .../freemarker/core/LocalLambdaExpression.java     | 152 +++++++++
 src/main/java/freemarker/core/MethodCall.java      |  26 +-
 .../java/freemarker/core/NonMethodException.java   |  22 +-
 src/main/java/freemarker/core/Sep.java             |   2 +-
 ...iltInForSequence.java => SequenceIterator.java} |  31 +-
 .../core/SingleIterationCollectionModel.java       |  51 +++
 .../freemarker/core/UnexpectedTypeException.java   |   2 +-
 src/main/java/freemarker/core/UnifiedCall.java     |   2 +-
 src/main/javacc/FTL.jj                             | 129 +++++++-
 src/manual/en_US/book.xml                          |   2 +-
 src/manual/zh_CN/book.xml                          |   2 +-
 src/test/java/freemarker/core/FilterBiTest.java    | 142 +++++++++
 .../core/ListWithStreamLikeBuiltinsTest.java       | 104 +++++++
 src/test/java/freemarker/core/MapBiTest.java       | 206 ++++++++++++
 .../resources/freemarker/core/ast-builtins.ast     |   4 +-
 27 files changed, 1510 insertions(+), 278 deletions(-)
 rename src/main/java/freemarker/core/{BuiltInsWithParseTimeParameters.java => BuiltInsWithLazyConditionals.java} (81%)
 copy src/main/java/freemarker/core/{ExistsExpression.java => ExpressionWithFixedResult.java} (50%)
 mode change 100755 => 100644
 create mode 100644 src/main/java/freemarker/core/LocalLambdaExpression.java
 copy src/main/java/freemarker/core/{BuiltInForSequence.java => SequenceIterator.java} (64%)
 create mode 100644 src/main/java/freemarker/core/SingleIterationCollectionModel.java
 create mode 100644 src/test/java/freemarker/core/FilterBiTest.java
 create mode 100644 src/test/java/freemarker/core/ListWithStreamLikeBuiltinsTest.java
 create mode 100644 src/test/java/freemarker/core/MapBiTest.java