-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[FIX]] Correct behavior of singleGroups (#2951)
* [[FIX]] Correct behavior of singleGroups The grouping operator may be necessary if the right-binding power of the operator preceeding the "(" token is greater than the left-binding power of the operator immediately following it. The initial implementation approximated this behavior by using the readily-accessible left-binding power of both operators. This heuristic is not always accurate, however as in the following case: typeof (a + b); Here, the necessity of the grouping operator is determined by the right-binding power of the `typeof` operator. Extend the Pratt parser to make the right-binding power available to all null denotation ("nud") functions. Remove an invalid unit test exposed by this improvement. * fixup! [[FIX]] Correct behavior of singleGroups
- Loading branch information
1 parent
05d7a31
commit 97fefb7
Showing
2 changed files
with
15 additions
and
17 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