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

__construct(array $tokens)

No description

parseExpression()

No description

parseArguments()

No description

parseModifier()

No description

bool
isEnd()

No description

parseUnquotedStringOrExpression(bool $colon = true)

No description

Token|null
tryConsumeModifier(string ...$modifiers)

No description

SuperiorTypeNode|null
parseType()

No description

static IdentifierNode
handleBuiltinTypes(NameNode $name)

No description

static IntegerNode
parseOffset(string $str, Position $position)

No description

EncapsedStringNode
parseDocString(string $startToken, array $parts, string $endToken, Position $startPos, Position $endPos)

No description

Details

at line 40
__construct(array $tokens)

No description

Parameters

array $tokens

at line 48
ExpressionNode parseExpression()

No description

Return Value

ExpressionNode

at line 54
ArrayNode parseArguments()

No description

Return Value

ArrayNode

at line 60
ModifierNode parseModifier()

No description

Return Value

ModifierNode

at line 68
bool isEnd()

No description

Return Value

bool

at line 74
ExpressionNode parseUnquotedStringOrExpression(bool $colon = true)

No description

Parameters

bool $colon

Return Value

ExpressionNode

at line 94
Token|null tryConsumeModifier(string ...$modifiers)

No description

Parameters

string ...$modifiers

Return Value

Token|null

at line 104
SuperiorTypeNode|null parseType()

No description

Return Value

SuperiorTypeNode|null

at line 258
static protected IdentifierNode handleBuiltinTypes(NameNode $name)

No description

Parameters

NameNode $name

Return Value

IdentifierNode

at line 272
static protected IntegerNode parseOffset(string $str, Position $position)

No description

Parameters

string $str
Position $position

Return Value

IntegerNode

at line 288
protected EncapsedStringNode parseDocString(string $startToken, array $parts, string $endToken, Position $startPos, Position $endPos)

No description

Parameters

string $startToken
array $parts
string $endToken
Position $startPos
Position $endPos

Return Value

EncapsedStringNode

Traits

Better OOP experience.