facebook / starlark-rust

A Rust implementation of the Starlark language
Apache License 2.0
673 stars 53 forks source link

feat: graceful parsing of `load` statements #83

Closed MaartenStaa closed 11 months ago

MaartenStaa commented 11 months ago

Don't produce a parse error on load statements with only one argument, issue an error to the parser state instead. This allow the LSP to correctly detect when the cursor is inside the first argument to a load statement, and offer autocomplete options accordingly (see also #82).

ndmitchell commented 11 months ago

Thanks for the diff. Looks good to me, but I'll let @stepancheg review here too, then we can import/merge it.

stepancheg commented 11 months ago

Looks good.

facebook-github-bot commented 11 months ago

@stepancheg has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 11 months ago

@stepancheg merged this pull request in facebookexperimental/starlark-rust@0e5192fc279e80070b7553077c76e7433af1e118.