File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
components/expression_language Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 55Dumping and Manipulating the AST of Expressions
66===============================================
77
8- Manipulating or inspecting the expressions created with the ExpressionLanguage
9- component is difficult because they are plain strings. A better approach is to
8+ It’s difficult to manipulate or inspect the expressions created with the ExpressionLanguage
9+ component, because the expressions are plain strings. A better approach is to
1010turn those expressions into an AST. In computer science, `AST `_ (*Abstract
1111Syntax Tree *) is *"a tree representation of the structure of source code written
1212in a programming language" *. In Symfony, a ExpressionLanguage AST is a set of
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ The ``evaluate()`` method needs to loop through the "nodes" (pieces of an
2525expression saved in the ``ParsedExpression ``) and evaluate them on the fly.
2626
2727To save time, the ``ExpressionLanguage `` caches the ``ParsedExpression `` so
28- it can skip the tokenize and parse steps with duplicate expressions. The
28+ it can skip the tokenization and parsing steps with duplicate expressions. The
2929caching is done by a PSR-6 `CacheItemPoolInterface `_ instance (by default, it
3030uses an :class: `Symfony\\ Component\\ Cache\\ Adapter\\ ArrayAdapter `). You can
3131customize this by creating a custom cache pool or using one of the available
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ Comparison Operators
195195
196196 $expressionLanguage->evaluate('not ("foo" matches "/bar/")'); // returns true
197197
198- You must use parenthesis because the unary operator ``not `` has precedence
198+ You must use parentheses because the unary operator ``not `` has precedence
199199 over the binary operator ``matches ``.
200200
201201Examples::
You can’t perform that action at this time.
0 commit comments