-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow][match] Fix parsing of match statements
Summary: Unlike match expressions, for match statements we need to rollback when parsing (like we do for parsing arrow expressions). You can take a look at the new test cases for why (previously failing). Rolling back is expensive, but thankfully it will only happen in the case where we have `match [no newline] (`, which limits the damage, and only in the statement case. (In WWW there are no instances of calls with the callee `match` at the start of an expression statement, that I could find using `flow-runner query-ast -e 'CallExpression[callee.name="match"]'`, so this slow case of having to roll back should not be hit often). Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D66530673 fbshipit-source-id: 72e52db853c3ef19bb87db0a357c1f9744bce11e
- Loading branch information
1 parent
7738181
commit 7cd2330
Showing
8 changed files
with
471 additions
and
56 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
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
Oops, something went wrong.