TagParser
final class TagParser
Parser for PHP-like expression language used in tags.
Based on works by Nikita Popov, Moriyoshi Koizumi and Masato Bito.
Constants
| private SchemaExpression |
|
| private SchemaArguments |
|
| private SchemaFilters |
|
| private SchemaForeach |
|
| private SymbolNone |
|
Properties
| $stream | |||
| $text | |||
| protected ArrayNode> | $shortArrays |
Methods
No description
Parses PHP-like expression.
Parses optional list of arguments. Named and variadic arguments are also supported.
Parses optional list of filters.
Parses unquoted string or PHP-like expression.
Parses optional type declaration.
Parses variables used in foreach.
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
No description
No description
No description
Details
at line 46
__construct(array $tokens)
No description
at line 57
ExpressionNode
parseExpression()
Parses PHP-like expression.
at line 66
ArrayNode
parseArguments()
Parses optional list of arguments. Named and variadic arguments are also supported.
at line 75
ModifierNode
parseModifier()
Parses optional list of filters.
at line 86
ExpressionNode
parseUnquotedStringOrExpression(bool $colon = true)
Parses unquoted string or PHP-like expression.
at line 109
SuperiorTypeNode|null
parseType()
Parses optional type declaration.
at line 129
array
parseForeach()
| internal |
Parses variables used in foreach.
at line 138
Token|null
tryConsumeTokenBeforeUnquotedString(string ...$kind)
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
at line 148
Token|null
tryConsumeModifier(string ...$kind)
No description
at line 156
bool
isEnd()
No description
at line 294
throwReservedKeywordException(Token $token)
No description
at line 300
protected ExpressionNode
checkFunctionName(FunctionCallNode $func)
No description
at line 309
static protected IdentifierNode
handleBuiltinTypes(NameNode $name)
No description
at line 323
static protected IntegerNode
parseOffset(string $str, Position $position)
No description