Add recursive expand in vscode

This commit is contained in:
Edwin Cheng 2019-11-18 02:47:50 +08:00
parent d2782ab1c1
commit 3ccd05fedc
8 changed files with 210 additions and 5 deletions

View file

@ -42,6 +42,7 @@ mod display;
mod inlay_hints;
mod wasm_shims;
mod expand;
mod expand_macro;
#[cfg(test)]
mod marks;
@ -296,6 +297,10 @@ impl Analysis {
self.with_db(|db| syntax_tree::syntax_tree(&db, file_id, text_range))
}
pub fn expand_macro(&self, position: FilePosition) -> Cancelable<Option<(String, String)>> {
self.with_db(|db| expand_macro::expand_macro(db, position))
}
/// Returns an edit to remove all newlines in the range, cleaning up minor
/// stuff like trailing commas.
pub fn join_lines(&self, frange: FileRange) -> Cancelable<SourceChange> {