-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update spec to have named arguments in functions
Summary: In practice, we want to be explicit about arguments in whisker since there is no type checking nor autocomplete. This diff updates the grammar to have keyword arguments [like Python](https://docs.python.org/3.13/glossary.html#term-argument) and [matches the syntax in Handlebars](https://handlebarsjs.com/guide/builtin-helpers.html#if). Notice that the change to the grammar is purely additive in nature and does not break any existing code. When user-defined functions are implemented in Whisker, I expect both positional and named arguments will be supported on day 1. That's why the spec change should happen as early as possible :) Now, everything is in place to go and implement it. I've also added a small example of `expression`s. Reviewed By: createdbysk Differential Revision: D67586812 fbshipit-source-id: 1e7e945bdbb54f8f76bddff551b995fa328f50ac
- Loading branch information
1 parent
58449a1
commit 77da4c8
Showing
2 changed files
with
35 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