You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Add `enum:self` for direct AST access in templates. To this end pass the prototype database via `mstch_context` to mstch object ctors.
Demonstrate usage by updating `declare_enums.mustache`.
Before:
```
return "{{enum:name}}";
```
After:
```
return "{{enum:self.name}}";
```
Once we fully migrate templates, we'll be able to drop the `self` part which will give the same ergonomics as before but without the legacy mstch object layer.
To simplify the review `self` is only added to a single mstch object type in this diff, the rest will be added in a follow-up diff.
Reviewed By: praihan
Differential Revision: D71205072
fbshipit-source-id: 6db90dc5442e34bf7382264abe6a5c90f0ec3545
0 commit comments