ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Parses expressions. More...
Public Member Functions | |
__construct (Twig_Parser $parser, $env=null) | |
parseExpression ($precedence=0) | |
parsePrimaryExpression () | |
parseStringExpression () | |
parseArrayExpression () | |
parseHashExpression () | |
parsePostfixExpression ($node) | |
getFunctionNode ($name, $line) | |
parseSubscriptExpression ($node) | |
parseFilterExpression ($node) | |
parseFilterExpressionRaw ($node, $tag=null) | |
parseArguments ($namedArguments=false, $definition=false) | |
Parses arguments. More... | |
parseAssignmentExpression () | |
parseMultitargetExpression () | |
Data Fields | |
const | OPERATOR_LEFT = 1 |
const | OPERATOR_RIGHT = 2 |
Protected Member Functions | |
getPrimary () | |
parseConditionalExpression ($expr) | |
isUnary (Twig_Token $token) | |
isBinary (Twig_Token $token) | |
getFunctionNodeClass ($name, $line) | |
getFilterNodeClass ($name, $line) | |
checkConstantExpression (Twig_NodeInterface $node) | |
Protected Attributes | |
$parser | |
$unaryOperators | |
$binaryOperators | |
Private Member Functions | |
parseNotTestExpression (Twig_NodeInterface $node) | |
parseTestExpression (Twig_NodeInterface $node) | |
getTest ($line) | |
getTestNodeClass ($test) | |
Private Attributes | |
$env | |
Parses expressions.
This parser implements a "Precedence climbing" algorithm.
Definition at line 25 of file ExpressionParser.php.
Twig_ExpressionParser::__construct | ( | Twig_Parser | $parser, |
$env = null |
|||
) |
Definition at line 36 of file ExpressionParser.php.
References $env, $parser, and Twig_Parser\getEnvironment().
|
protected |
Definition at line 726 of file ExpressionParser.php.
References $n.
Referenced by parseArguments().
|
protected |
Definition at line 695 of file ExpressionParser.php.
References $message, $name, Twig_Error_Syntax\addSuggestions(), Twig_Filter_Node\getClass(), and Twig_SimpleFilter\isDeprecated().
Referenced by parseFilterExpressionRaw(), and parseSubscriptExpression().
Twig_ExpressionParser::getFunctionNode | ( | $name, | |
$line | |||
) |
Definition at line 335 of file ExpressionParser.php.
References $n, $name, Twig_TemplateInterface\ANY_CALL, getFunctionNodeClass(), and parseArguments().
Referenced by parsePrimaryExpression().
|
protected |
Definition at line 665 of file ExpressionParser.php.
References $message, $name, Twig_Error_Syntax\addSuggestions(), Twig_Function_Node\getClass(), and Twig_SimpleFunction\isDeprecated().
Referenced by getFunctionNode().
|
protected |
Definition at line 83 of file ExpressionParser.php.
References PHPMailer\PHPMailer\$token, isUnary(), parseExpression(), parsePostfixExpression(), parsePrimaryExpression(), and Twig_Token\PUNCTUATION_TYPE.
Referenced by parseExpression().
|
private |
Definition at line 615 of file ExpressionParser.php.
References $name, GuzzleHttp\Psr7\$stream, $test, Twig_Error_Syntax\addSuggestions(), and Twig_Token\NAME_TYPE.
Referenced by parseTestExpression().
|
private |
Definition at line 641 of file ExpressionParser.php.
References $message, GuzzleHttp\Psr7\$stream, and $test.
Referenced by parseTestExpression().
|
protected |
Definition at line 131 of file ExpressionParser.php.
References Twig_Token\getValue(), Twig_Token\OPERATOR_TYPE, and Twig_Token\test().
Referenced by parseExpression().
|
protected |
Definition at line 126 of file ExpressionParser.php.
References Twig_Token\getValue(), Twig_Token\OPERATOR_TYPE, and Twig_Token\test().
Referenced by getPrimary().
Twig_ExpressionParser::parseArguments | ( | $namedArguments = false , |
|
$definition = false |
|||
) |
Parses arguments.
bool | $namedArguments | Whether to allow named arguments or not |
bool | $definition | Whether we are parsing arguments for a function definition |
Twig_Error_Syntax |
Definition at line 508 of file ExpressionParser.php.
References $name, GuzzleHttp\Psr7\$stream, PHPMailer\PHPMailer\$token, checkConstantExpression(), Twig_Token\NAME_TYPE, Twig_Token\OPERATOR_TYPE, parseExpression(), parsePrimaryExpression(), and Twig_Token\PUNCTUATION_TYPE.
Referenced by getFunctionNode(), parseFilterExpressionRaw(), and parseSubscriptExpression().
Twig_ExpressionParser::parseArrayExpression | ( | ) |
Definition at line 246 of file ExpressionParser.php.
References GuzzleHttp\Psr7\$stream, Twig_Node_Expression_Array\addElement(), parseExpression(), and Twig_Token\PUNCTUATION_TYPE.
Referenced by parsePrimaryExpression().
Twig_ExpressionParser::parseAssignmentExpression | ( | ) |
Definition at line 563 of file ExpressionParser.php.
References GuzzleHttp\Psr7\$stream, PHPMailer\PHPMailer\$token, Twig_Token\NAME_TYPE, and Twig_Token\PUNCTUATION_TYPE.
|
protected |
Definition at line 105 of file ExpressionParser.php.
References parseExpression(), and Twig_Token\PUNCTUATION_TYPE.
Referenced by parseExpression().
Twig_ExpressionParser::parseExpression | ( | $precedence = 0 | ) |
Definition at line 53 of file ExpressionParser.php.
References PHPMailer\PHPMailer\$token, getPrimary(), isBinary(), parseConditionalExpression(), parseNotTestExpression(), and parseTestExpression().
Referenced by getPrimary(), parseArguments(), parseArrayExpression(), parseConditionalExpression(), parseHashExpression(), parseMultitargetExpression(), parseStringExpression(), and parseSubscriptExpression().
Twig_ExpressionParser::parseFilterExpression | ( | $node | ) |
Definition at line 465 of file ExpressionParser.php.
References parseFilterExpressionRaw().
Referenced by parsePostfixExpression().
Twig_ExpressionParser::parseFilterExpressionRaw | ( | $node, | |
$tag = null |
|||
) |
Definition at line 472 of file ExpressionParser.php.
References $name, $tag, PHPMailer\PHPMailer\$token, getFilterNodeClass(), Twig_Token\NAME_TYPE, parseArguments(), and Twig_Token\PUNCTUATION_TYPE.
Referenced by parseFilterExpression().
Twig_ExpressionParser::parseHashExpression | ( | ) |
Definition at line 271 of file ExpressionParser.php.
References $current, $key, GuzzleHttp\Psr7\$stream, PHPMailer\PHPMailer\$token, Twig_Token\NAME_TYPE, Twig_Token\NUMBER_TYPE, parseExpression(), Twig_Token\PUNCTUATION_TYPE, Twig_Token\STRING_TYPE, and Twig_Token\typeToEnglish().
Referenced by parsePrimaryExpression().
Twig_ExpressionParser::parseMultitargetExpression | ( | ) |
Definition at line 583 of file ExpressionParser.php.
References parseExpression(), and Twig_Token\PUNCTUATION_TYPE.
|
private |
Definition at line 596 of file ExpressionParser.php.
References parseTestExpression().
Referenced by parseExpression().
Twig_ExpressionParser::parsePostfixExpression | ( | $node | ) |
Definition at line 315 of file ExpressionParser.php.
References PHPMailer\PHPMailer\$token, parseFilterExpression(), parseSubscriptExpression(), and Twig_Token\PUNCTUATION_TYPE.
Referenced by getPrimary(), and parsePrimaryExpression().
Twig_ExpressionParser::parsePrimaryExpression | ( | ) |
Definition at line 136 of file ExpressionParser.php.
References PHPMailer\PHPMailer\$token, getFunctionNode(), Twig_Token\INTERPOLATION_START_TYPE, Twig_Token\NAME_TYPE, Twig_Token\NUMBER_TYPE, Twig_Token\OPERATOR_TYPE, parseArrayExpression(), parseHashExpression(), parsePostfixExpression(), parseStringExpression(), Twig_Token\PUNCTUATION_TYPE, Twig_Lexer\REGEX_NAME, Twig_Token\STRING_TYPE, and Twig_Token\typeToEnglish().
Referenced by getPrimary(), and parseArguments().
Twig_ExpressionParser::parseStringExpression | ( | ) |
Definition at line 218 of file ExpressionParser.php.
References $nodes, GuzzleHttp\Psr7\$stream, PHPMailer\PHPMailer\$token, Twig_Token\INTERPOLATION_END_TYPE, Twig_Token\INTERPOLATION_START_TYPE, parseExpression(), and Twig_Token\STRING_TYPE.
Referenced by parsePrimaryExpression().
Twig_ExpressionParser::parseSubscriptExpression | ( | $node | ) |
Definition at line 383 of file ExpressionParser.php.
References $n, $name, GuzzleHttp\Psr7\$stream, PHPMailer\PHPMailer\$token, $type, Twig_TemplateInterface\ANY_CALL, Twig_TemplateInterface\ARRAY_CALL, getFilterNodeClass(), Twig_TemplateInterface\METHOD_CALL, Twig_Token\NAME_TYPE, Twig_Token\NUMBER_TYPE, Twig_Token\OPERATOR_TYPE, parseArguments(), parseExpression(), Twig_Token\PUNCTUATION_TYPE, and Twig_Lexer\REGEX_NAME.
Referenced by parsePostfixExpression().
|
private |
Definition at line 601 of file ExpressionParser.php.
References $name, GuzzleHttp\Psr7\$stream, $test, getTest(), getTestNodeClass(), and Twig_Token\PUNCTUATION_TYPE.
Referenced by parseExpression(), and parseNotTestExpression().
|
protected |
Definition at line 32 of file ExpressionParser.php.
|
private |
Definition at line 34 of file ExpressionParser.php.
Referenced by __construct().
|
protected |
Definition at line 30 of file ExpressionParser.php.
Referenced by __construct().
|
protected |
Definition at line 31 of file ExpressionParser.php.
const Twig_ExpressionParser::OPERATOR_LEFT = 1 |
Definition at line 27 of file ExpressionParser.php.
Referenced by Twig_Extension_Core\getOperators().
const Twig_ExpressionParser::OPERATOR_RIGHT = 2 |
Definition at line 28 of file ExpressionParser.php.
Referenced by Twig_Extension_Core\getOperators().