-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(espower): disambiguate between function calls and async/yield ex…
…pressions In order to fully disambiguate the contextual keywords `async` and `yield`, we need to pass along some addtional context to power-assert-formatter. Specifically whether the enclosing function is async or a generator. This adds two new properties to the context passed to `assert._expr()` - `async: true` if the function enclosing the assertion is an async function - `generator: true` if the function enclosing the assertion is a generator In both cases, we do not set a property if the enclosing function is not a generator/async (i.e. we never pass `async:false`). This is primarily to avoid having to rewrite a bunch of existing unit tests.
- Loading branch information
1 parent
cccfa90
commit 398585f
Showing
3 changed files
with
67 additions
and
7 deletions.
There are no files selected for viewing
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