//
// Other types, such as STRING_TYPE and NUMBER_TYPE, can't be parsed as property nor method names.
//
// As a result, if $token is NOT an operator OR $token->value is NOT a valid property or method name, an exception shall be thrown.
&& (Token::OPERATOR_TYPE !==
$token->type || !
preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A',
$token->value
)) ) { throw new SyntaxError('Expected name.',
$token->cursor,
$this->stream->
getExpression());
} $arg =
new Node\
ConstantNode($token->value, true,
$isNullSafe);
$arguments =
new Node\
ArgumentsNode();
if ($this->stream->current->
test(Token::PUNCTUATION_TYPE, '('
)) { $type = Node\GetAttrNode::METHOD_CALL;
foreach ($this->
parseArguments()->nodes
as $n) { $arguments->
addElement($n);
} } else { $type = Node\GetAttrNode::PROPERTY_CALL;
} $node =
new Node\
GetAttrNode($node,
$arg,
$arguments,
$type);
} elseif ('[' ===
$token->value
) {