chore(parser): return AST and Warnings

This commit is contained in:
Shunsuke Shibayama 2023-06-09 02:36:41 +09:00
parent d4b78eb020
commit 324618dbdc
21 changed files with 443 additions and 128 deletions

View file

@ -215,12 +215,12 @@ impl ASTLowerer {
format!("{}{code}", "\n".repeat(first_line as usize))
};
match ASTBuilder::new(self.cfg().clone()).build(code) {
Ok(ast) => {
self.check_doc_ast(ast);
Ok(artifact) => {
self.check_doc_ast(artifact.ast);
}
Err(errs) => {
let errs = CompileErrors::from(errs);
self.errs.extend(errs);
Err(iart) => {
self.errs.extend(CompileErrors::from(iart.errors));
self.warns.extend(CompileErrors::from(iart.warns));
}
}
}