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

Common information sharing for helper components #427

Open
suikabreaker opened this issue Aug 7, 2020 · 1 comment
Open

Common information sharing for helper components #427

suikabreaker opened this issue Aug 7, 2020 · 1 comment

Comments

@suikabreaker
Copy link

It would be helpful for different components of helper, e.g. , completer and hinter, to share some information.

Completer and hinter may both take item from a candidate list.

Furthermore, they may share the intermidiate parsing result to avoid parsing input multiple times and replicating calls to parsing code.

@gwenn
Copy link
Collaborator

gwenn commented Aug 7, 2020

See:
https://github.com/kkawakam/rustyline/blob/bc687690309a0c4cd4f67fbff8f7569250b816c2/BUGS.md#document--syntax

Because, when you have tokens (which may be as simple as words) or an AST, completion / suggestion / highlighting / validation become easy. So we need to send events to a lexer/parser, update Document accordingly. And fix Completer / Hinter / Highlighter API such as they have access to Document.

#207 (comment)

For one syntax, Hinter, Highlighter and Completer, Validator should/would/will be correlated.
Because they should/would/will share the same Tokenizer/Parser.
Currently, each one parses the same input...

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

No branches or pull requests

2 participants