-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open up visibility of starlark-syntax
Summary: # Goal One of the wins from having this as a separate extension is that we can customize the lint warnings for Sandcastle-specific codesmells. # This diff This is an RFC/POC for a very simple one: no `entry_point` called outside of the top-level. To get this to work, I needed to make some changes to the visibility of things. See [this discussion](https://fb.workplace.com/groups/starlark/permalink/1547671819254974/) for context -- but *tldr;* is that a lot of the AST-manipulation/traversal stuff in `starlark_syntax` is hidden away. The changes I made are to: - Expose a `statements()` getter on `AstModule` - Remove the visibility rule on `starlark_syntax`, making it available for use outside of `starlark-rust` These were both needed because I want to specifically manipulate the Starlark AST (ie. traverse things the bodies of function definitions). See how I use them in D67765416. The hope is that these changes are amenable for the maintainers for `starlark-rust` -- obviously I'm open to suggestions for other approaches as well. Reviewed By: JakobDegen Differential Revision: D67611206 fbshipit-source-id: d577f1886ff190d191f3c55022f9d485f6eb03be
- Loading branch information
1 parent
78169ab
commit 5c8ca2d
Showing
5 changed files
with
6 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
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