Parser
in package
Tags
Table of Contents
Properties
- $blocks : mixed
- $blockStack : mixed
- $embeddedTemplates : mixed
- $env : mixed
- $expressionParser : mixed
- $importedSymbols : mixed
- $macros : mixed
- $parent : mixed
- $stack : mixed
- $stream : mixed
- $traits : mixed
- $varNameSalt : mixed
- $visitors : mixed
Methods
- __construct() : mixed
- addImportedSymbol() : void
- addTrait() : void
- embedTemplate() : mixed
- getBlock() : Node
- getBlockStack() : array<string|int, mixed>
- getCurrentToken() : Token
- getExpressionParser() : ExpressionParser
- getImportedSymbol() : mixed
- getParent() : Node|null
- getStream() : TokenStream
- getVarName() : string
- hasBlock() : bool
- hasMacro() : bool
- hasTraits() : bool
- isMainScope() : bool
- parse() : ModuleNode
- peekBlockStack() : mixed
- popBlockStack() : void
- popLocalScope() : void
- pushBlockStack() : void
- pushLocalScope() : void
- setBlock() : void
- setMacro() : void
- setParent() : void
- subparse() : Node
- filterBodyNodes() : Node|null
Properties
$blocks
private
mixed
$blocks
$blockStack
private
mixed
$blockStack
$embeddedTemplates
private
mixed
$embeddedTemplates
= []
$env
private
mixed
$env
$expressionParser
private
mixed
$expressionParser
$importedSymbols
private
mixed
$importedSymbols
$macros
private
mixed
$macros
$parent
private
mixed
$parent
$stack
private
mixed
$stack
= []
$stream
private
mixed
$stream
$traits
private
mixed
$traits
$varNameSalt
private
mixed
$varNameSalt
= 0
$visitors
private
mixed
$visitors
Methods
__construct()
public
__construct(Environment $env) : mixed
Parameters
- $env : Environment
addImportedSymbol()
public
addImportedSymbol(string $type, string $alias[, string|null $name = null ][, AbstractExpression|null $node = null ]) : void
Parameters
- $type : string
- $alias : string
- $name : string|null = null
- $node : AbstractExpression|null = null
addTrait()
public
addTrait(mixed $trait) : void
Parameters
- $trait : mixed
embedTemplate()
public
embedTemplate(ModuleNode $template) : mixed
Parameters
- $template : ModuleNode
getBlock()
public
getBlock(string $name) : Node
Parameters
- $name : string
Return values
NodegetBlockStack()
public
getBlockStack() : array<string|int, mixed>
Return values
array<string|int, mixed>getCurrentToken()
public
getCurrentToken() : Token
Return values
TokengetExpressionParser()
public
getExpressionParser() : ExpressionParser
Return values
ExpressionParsergetImportedSymbol()
public
getImportedSymbol(string $type, string $alias) : mixed
Parameters
- $type : string
- $alias : string
getParent()
public
getParent() : Node|null
Return values
Node|nullgetStream()
public
getStream() : TokenStream
Return values
TokenStreamgetVarName()
public
getVarName() : string
Return values
stringhasBlock()
public
hasBlock(string $name) : bool
Parameters
- $name : string
Return values
boolhasMacro()
public
hasMacro(string $name) : bool
Parameters
- $name : string
Return values
boolhasTraits()
public
hasTraits() : bool
Return values
boolisMainScope()
public
isMainScope() : bool
Return values
boolparse()
public
parse(TokenStream $stream[, mixed $test = null ][, bool $dropNeedle = false ]) : ModuleNode
Parameters
- $stream : TokenStream
- $test : mixed = null
- $dropNeedle : bool = false
Return values
ModuleNodepeekBlockStack()
public
peekBlockStack() : mixed
popBlockStack()
public
popBlockStack() : void
popLocalScope()
public
popLocalScope() : void
pushBlockStack()
public
pushBlockStack(mixed $name) : void
Parameters
- $name : mixed
pushLocalScope()
public
pushLocalScope() : void
setBlock()
public
setBlock(string $name, BlockNode $value) : void
Parameters
- $name : string
- $value : BlockNode
setMacro()
public
setMacro(string $name, MacroNode $node) : void
Parameters
- $name : string
- $node : MacroNode
setParent()
public
setParent(Node|null $parent) : void
Parameters
- $parent : Node|null
subparse()
public
subparse(mixed $test[, bool $dropNeedle = false ]) : Node
Parameters
- $test : mixed
- $dropNeedle : bool = false
Return values
NodefilterBodyNodes()
private
filterBodyNodes(Node $node[, bool $nested = false ]) : Node|null
Parameters
- $node : Node
- $nested : bool = false