1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 00:32:41 +01:00

Allow pht(<<<HEREDOC ... HEREDOC)

Summary: Don't raise lint on heredoc literals.

Test Plan: Linted pht() + heredoc in D4477.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4478
This commit is contained in:
epriestley 2013-01-16 14:57:10 -08:00
parent 90129c5432
commit a39b591c95

View file

@ -294,8 +294,13 @@ final class ArcanistXHPASTLinter extends ArcanistLinter {
continue;
}
// TODO: Desceptively, n_STRING_SCALAR may include variables, mostly
// because I was lazy when implementing the parser. We should perform more
// strict checks here, and/or enhance the parser.
$identifier = $parameters->getChildByIndex(0);
if ($identifier->getTypeName() == 'n_STRING_SCALAR') {
if ($identifier->getTypeName() == 'n_STRING_SCALAR' ||
$identifier->getTypeName() == 'n_HEREDOC') {
continue;
}