refactor(semantic): remove the unused Semantic::build2 function

This commit is contained in:
Boshen 2024-06-28 22:40:29 +08:00
parent 750cb43624
commit 15ec254740
No known key found for this signature in database
GPG key ID: 9C7A8C8AB22BEBD1

View file

@ -183,22 +183,6 @@ impl<'a> SemanticBuilder<'a> {
SemanticBuilderReturn { semantic, errors: self.errors.into_inner() }
}
pub fn build2(self) -> Semantic<'a> {
Semantic {
source_text: self.source_text,
source_type: self.source_type,
trivias: self.trivias,
nodes: self.nodes,
scopes: self.scope,
symbols: self.symbols,
classes: self.class_table_builder.build(),
module_record: Arc::new(ModuleRecord::default()),
jsdoc: self.jsdoc.build(),
unused_labels: self.label_builder.unused_node_ids,
cfg: self.cfg.map(ControlFlowGraphBuilder::build),
}
}
/// Push a Syntax Error
pub fn error(&self, error: OxcDiagnostic) {
self.errors.borrow_mut().push(error);