fix(cli): should return semantic errors

This commit is contained in:
Boshen 2023-03-17 09:43:53 +08:00
parent 37ad6f3a15
commit 5b2474600f
No known key found for this signature in database
GPG key ID: 6AC90C77AAAA6ABC

View file

@ -145,7 +145,7 @@ impl Cli {
let semantic_ret = SemanticBuilder::new(source_type).build(program, trivias);
if !semantic_ret.errors.is_empty() {
return Some(Self::wrap_diagnostics(path, &source_text, ret.errors));
return Some(Self::wrap_diagnostics(path, &source_text, semantic_ret.errors));
};
let result = Linter::new().run(&Rc::new(semantic_ret.semantic), &source_text, fix);