Skip to content

Make parser reusable #327

Open
Open
@danielshahaf

Description

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions