Return incomplete parse from lite_parse (#2284)

* Move lite_parse tests into a submodule

* Have lite_parse return partial parses when error encountered.

Although a parse fails, we can generally still return what was successfully
parsed. This is useful, for example, when figuring out completions at some
cursor position, because we can map the cursor to something more structured
(e.g., cursor is at a flag name).
This commit is contained in:
Jason Gedge
2020-08-01 14:39:55 -04:00
committed by GitHub
parent ee734873ba
commit cda53b6cda
4 changed files with 331 additions and 253 deletions

View File

@ -1,11 +1,13 @@
mod errors;
mod lite_parse;
mod parse;
mod path;
mod shapes;
mod signature;
pub use crate::lite_parse::{lite_parse, LiteBlock};
pub use crate::parse::{classify_block, garbage, parse_full_column_path};
pub use crate::path::expand_ndots;
pub use crate::shapes::shapes;
pub use crate::signature::{Signature, SignatureRegistry};
pub use errors::{ParseError, ParseResult};
pub use lite_parse::{lite_parse, LiteBlock};
pub use parse::{classify_block, garbage, parse_full_column_path};
pub use path::expand_ndots;
pub use shapes::shapes;
pub use signature::{Signature, SignatureRegistry};