Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make parser reusable #327

Open
danielshahaf opened this issue May 31, 2016 · 1 comment
Open

Make parser reusable #327

danielshahaf opened this issue May 31, 2016 · 1 comment
Labels

Comments

@danielshahaf
Copy link
Member

danielshahaf commented May 31, 2016

The main highlighter incorporates a zsh syntax parser. Separate that parser into an independently reusable component. The lexer is mostly handled by bufferwords() aka ${(z)}, although subshells and command substitutions are not currently recursed into (they're returned as a single token).

I do not have a concrete use-case for that at the moment, but I suspect one of these days somebody on zsh-workers@ will have an idea that will be much easier to implement were this done.

Note: it would be nice to reuse Src/parse.c's code, or to share code with compsys (get_comp_string).

@danielshahaf
Copy link
Member Author

Parsing parameter expansions should probably be its own project. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant