The fix essentially also checks for comment tokens as one of the stop conditions in the while loop.
Details
Details
- Reviewers
joshuaspence epriestley - Group Reviewers
Blessed Reviewers
Ran the method against the following test code:
// comment $x = 1;
The indentation of the statement node must be instead of .
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Branch
- master
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 7979 Build 8987: [Placeholder Plan] Wait for 30 Seconds Build 8986: arc lint + arc unit
Event Timeline
Comment Actions
I'm not entirely sure that this is correct... I think that we should add some unit tests before pursuing this.
src/parser/aast/api/AASTNode.php | ||
---|---|---|
260 | Prefer to use !$left->isSemantic() |
Comment Actions
I've tested the function myself use the cases below:
$x = 1;
// with comment $x = 1;
/* with comment */ $x = 1;
/* with comment */ $y = 2;