class MacroTokens extends TokenIterator

Macro tag tokenizer.

Constants

T_WHITESPACE

T_COMMENT

T_SYMBOL

T_NUMBER

T_VARIABLE

T_STRING

T_CAST

T_KEYWORD

T_CHAR

SIGNIFICANT

NON_SIGNIFICANT

Properties

int $depth

Methods

__construct($input = [])

No description

array
parse(string $s)

No description

append($val, int|null $position = null)

Appends simple token or string (will be parsed).

prepend($val)

Prepends simple token or string (will be parsed).

string|null
fetchWord()

Reads single expression optionally delimited by comma.

array
fetchWords() deprecated

No description

string
joinUntilSameDepth(int|string ...$args)

No description

array|null
fetchWordWithModifier(string|string[] $modifiers)

No description

reset()

No description

void
next()

Moves cursor to next token.

Details

at line 43
__construct($input = [])

No description

Parameters

$input

at line 53
array parse(string $s)

No description

Parameters

string $s

Return Value

array

at line 75
MacroTokens append($val, int|null $position = null)

Appends simple token or string (will be parsed).

Parameters

$val
int|null $position

Return Value

MacroTokens

at line 95
MacroTokens prepend($val)

Prepends simple token or string (will be parsed).

Parameters

$val

Return Value

MacroTokens

at line 108
string|null fetchWord()

Reads single expression optionally delimited by comma.

Return Value

string|null

at line 132
array fetchWords() deprecated

deprecated

No description

Return Value

array

at line 152
string joinUntilSameDepth(int|string ...$args)

No description

Parameters

int|string ...$args

token type or value to stop before (required)

Return Value

string

at line 171
array|null fetchWordWithModifier(string|string[] $modifiers)

No description

Parameters

string|string[] $modifiers

Return Value

array|null

at line 190
TokenIterator reset()

No description

Return Value

TokenIterator

at line 197
protected void next()

Moves cursor to next token.

Return Value

void