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 5
5
Dumping and Manipulating the AST of Expressions
6
6
===============================================
7
7
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
10
10
turn those expressions into an AST. In computer science, `AST `_ (*Abstract
11
11
Syntax Tree *) is *"a tree representation of the structure of source code written
12
12
in 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
25
25
expression saved in the ``ParsedExpression ``) and evaluate them on the fly.
26
26
27
27
To 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
29
29
caching is done by a PSR-6 `CacheItemPoolInterface `_ instance (by default, it
30
30
uses an :class: `Symfony\\ Component\\ Cache\\ Adapter\\ ArrayAdapter `). You can
31
31
customize 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
195
195
196
196
$expressionLanguage->evaluate('not ("foo" matches "/bar/")'); // returns true
197
197
198
- You must use parenthesis because the unary operator ``not `` has precedence
198
+ You must use parentheses because the unary operator ``not `` has precedence
199
199
over the binary operator ``matches ``.
200
200
201
201
Examples::
You can’t perform that action at this time.
0 commit comments