forked from hhvm/hhast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Document bug comparison empty statements The operators `<=` and `>=` should be treated as empty. They are currently treated as assignments. * Fix false negative, `<=` and `>=` in NoEmptyStatementsLinter * Document bug NodeList::getChildrenOfItemsOfType() does not refine * Fix type refinement of NodeList::getChildrenOfItemsOfType<T>() * Add NodeList::getChildrenOfItemsByType<T>() This completes this list: - Node->getChildrenOfType<T>() - Node->getDescendantsOfType<T>() - Node->getFirstDescendantOfType<T>() - NodeList->getChildrenOfItemsByType<T>() * Remove reference in comment to createMaybeEmptyList This function does not exist anymore. * Post commit formatting * Lint clean * Lint clean (with HHClientLinter) * Post commit formatting * One (last) lint error from HHClientLinter * Demonstrate the `() ==> constant` can not be parsed * Regenerate codegen, allowing constants as lambda bodies The Package* classes were deleted by codegen. I have ignored these deletions for backwards compat. * Limit semaphore to cpu count I don't got no 32 hardware threads * Fix lint error in syntax example
- Loading branch information
Showing
17 changed files
with
198 additions
and
44 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (c) 2017-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
namespace Facebook\HHAST\__Private\SyntaxExamples; | ||
|
||
function lambda_body(): void { | ||
$_ = () ==> Qualified\CONSTANT; | ||
$_ = () ==> CONSTANT; | ||
$_ = () ==> 1 + CONSTANT; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2017-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
|
||
namespace Facebook\HHAST; | ||
|
||
use type Facebook\HackTest\HackTest; | ||
use function Facebook\FBExpect\expect; | ||
|
||
final class NoParamsIsAMissingNodeTest extends HackTest { | ||
/** | ||
* @see `NodeList::__construct()` | ||
* If this test fails, don't try and fix it. | ||
* Just remove the comment (and this test) if this ever starts failing. | ||
*/ | ||
public function testTheFollowingCommentStaysCorrect(): void { | ||
$_error = null; | ||
$json = \HH\ffp_parse_string('function no_params( ): void {}') | ||
|> \json_encode_pure($$, inout $_error); | ||
expect($json)->toContainSubstring( | ||
'"function_parameter_list":{"kind":"missing"}', | ||
); | ||
} | ||
} |
Oops, something went wrong.