This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($parse): add support for ternary operators to parser
Add '?' token to lexer, add ternary rule to parser at (hopefully) proper precedence and associativity (based on https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Operator_Precedence). Since (exp1 && exp2 || exp3) is supported by the parser, and (exp1 ? exp2 : exp3) works the same way, it seems reasonable to add this minor form of control to templates (see #719).
- Loading branch information
1 parent
cefbcd4
commit 6798fec
Showing
2 changed files
with
83 additions
and
3 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