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 SymbolNone |
|
Properties
$stream | |||
$text |
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.
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
No description
No description
No description
Details
at line 40
__construct(array $tokens)
No description
at line 51
ExpressionNode
parseExpression()
Parses PHP-like expression.
at line 60
ArrayNode
parseArguments()
Parses optional list of arguments. Named and variadic arguments are also supported.
at line 69
ModifierNode
parseModifier()
Parses optional list of filters.
at line 80
ExpressionNode
parseUnquotedStringOrExpression(bool $colon = true)
Parses unquoted string or PHP-like expression.
at line 103
SuperiorTypeNode|null
parseType()
Parses optional type declaration.
at line 122
Token|null
tryConsumeTokenBeforeUnquotedString(string ...$kind)
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
at line 133
Token|null
tryConsumeModifier(string ...$kind)
deprecated
deprecated
No description
at line 139
bool
isEnd()
No description
at line 275
throwReservedKeywordException(Token $token)
No description
at line 281
protected ExpressionNode
checkFunctionName(FunctionCallableNode $func)
No description
at line 292
static protected IdentifierNode
handleBuiltinTypes(NameNode $name)
No description
at line 306
static protected IntegerNode
parseOffset(string $str, Position $position)
No description
Traits
Better OOP experience.