diff options
Diffstat (limited to 'crates/cli/src/main.rs')
-rw-r--r-- | crates/cli/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 45e0a1e4f..863aeb99d 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs | |||
@@ -10,7 +10,7 @@ use std::{ | |||
10 | }; | 10 | }; |
11 | use clap::{App, Arg, SubCommand}; | 11 | use clap::{App, Arg, SubCommand}; |
12 | use tools::collect_tests; | 12 | use tools::collect_tests; |
13 | use libeditor::{ast, syntax_tree, symbols}; | 13 | use libeditor::{File, syntax_tree, symbols}; |
14 | 14 | ||
15 | type Result<T> = ::std::result::Result<T, failure::Error>; | 15 | type Result<T> = ::std::result::Result<T, failure::Error>; |
16 | 16 | ||
@@ -68,9 +68,9 @@ fn main() -> Result<()> { | |||
68 | Ok(()) | 68 | Ok(()) |
69 | } | 69 | } |
70 | 70 | ||
71 | fn file() -> Result<ast::File> { | 71 | fn file() -> Result<File> { |
72 | let text = read_stdin()?; | 72 | let text = read_stdin()?; |
73 | Ok(ast::File::parse(&text)) | 73 | Ok(libeditor::parse(&text)) |
74 | } | 74 | } |
75 | 75 | ||
76 | fn read_stdin() -> Result<String> { | 76 | fn read_stdin() -> Result<String> { |
@@ -89,7 +89,7 @@ fn render_test(file: &Path, line: usize) -> Result<(String, String)> { | |||
89 | None => bail!("No test found at line {} at {}", line, file.display()), | 89 | None => bail!("No test found at line {} at {}", line, file.display()), |
90 | Some((_start_line, test)) => test, | 90 | Some((_start_line, test)) => test, |
91 | }; | 91 | }; |
92 | let file = ast::File::parse(&test.text); | 92 | let file = libeditor::parse(&test.text); |
93 | let tree = syntax_tree(&file); | 93 | let tree = syntax_tree(&file); |
94 | Ok((test.text, tree)) | 94 | Ok((test.text, tree)) |
95 | } | 95 | } |