[FEATURE] Support literal strings in boolean arguments
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 9 Feb 2013 13:01:42 +0000 (14:01 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 9 Feb 2013 17:02:40 +0000 (18:02 +0100)
commit3ca2b8d180b97d557aed58a0a97f7464c389a9a4
tree41778ceebcdd20389aea36296afe676091a184a0
parentb6781978d07f91ef7c081fdbd5bc6c9ba9d05187
[FEATURE] Support literal strings in boolean arguments

This change adds support for string literals in boolean comparisons.
String literals have to be surrounded by single or double quotes and
may contain escaped single or double quotes.

This is possible now:
<f:if condition="{foo} == 'foo'">

This is a port of the feature from FLOW.Fluid 1.2 from issue #6757.

Change-Id: I1799ff8c4187d33f47a2251404e59f87ff9cba1b
Resolves: #45316
Releases: 6.1
Reviewed-on: https://review.typo3.org/18156
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Markus Günther
Tested-by: Markus Günther
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NumericNode.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/BooleanNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/NumericNodeTest.php [new file with mode: 0644]