clarinet icon indicating copy to clipboard operation
clarinet copied to clipboard

Move `complete_input` into `rustyline::validate::Validator`

Open obycode opened this issue 3 years ago • 0 comments

We currently handle checking for un-closed brackets in the input via the complete_input function. This should instead be handled in a Validator passed into the Editor.

I checked if the MatchingBracketValidator would work out of the box, but it is not smart enough to handle the case fixed by hirosystems/clarity-repl#158, where, for example a ) is inside of a string.

This should likely be handled together with hirosystems/clarinet#446, since the Helper should handle both validation and completion (and it may also be easy to add highlighting in at the same time).

obycode avatar Jun 01 '22 20:06 obycode