// restore previous stack so previous parse() call can resume working
foreach (array_pop($this->stack
) as $key =>
$val) { $this->
$key =
$val;
} return $node;
} public function subparse($test, bool
$dropNeedle = false
): Node
{ $lineno =
$this->
getCurrentToken()->
getLine();
$rv =
[];
while (!
$this->stream->
isEOF()) { switch ($this->
getCurrentToken()->
getType()) { case /* Token::TEXT_TYPE */ 0:
$token =
$this->stream->
next();
$rv[] =
new TextNode($token->
getValue(),
$token->
getLine());
break;
case /* Token::VAR_START_TYPE */ 2:
$token =
$this->stream->
next();
$expr =
$this->expressionParser->
parseExpression();