TagParser
final class TagParser extends TagParserData
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 43
__construct(array $tokens)
No description
at line 54
ExpressionNode
parseExpression()
Parses PHP-like expression.
at line 63
ArrayNode
parseArguments()
Parses optional list of arguments. Named and variadic arguments are also supported.
at line 72
ModifierNode
parseModifier()
Parses optional list of filters.
at line 83
ExpressionNode
parseUnquotedStringOrExpression(bool $colon = true)
Parses unquoted string or PHP-like expression.
at line 106
SuperiorTypeNode|null
parseType()
Parses optional type declaration.
at line 126
array
parseForeach()
internal |
Parses variables used in foreach.
at line 135
Token|null
tryConsumeTokenBeforeUnquotedString(string ...$kind)
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
at line 146
Token|null
tryConsumeModifier(string ...$kind)
deprecated
deprecated
No description
at line 152
bool
isEnd()
No description
at line 290
throwReservedKeywordException(Token $token)
No description
at line 296
protected ExpressionNode
checkFunctionName(FunctionCallableNode $func)
No description
at line 307
static protected IdentifierNode
handleBuiltinTypes(NameNode $name)
No description
at line 321
static protected IntegerNode
parseOffset(string $str, Position $position)
No description