mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
perf(semantic): reduce calls to span() (#1851)
This commit is contained in:
parent
19577709db
commit
0e0f25872f
1 changed files with 2 additions and 1 deletions
|
|
@ -430,7 +430,8 @@ fn check_module_declaration<'a>(
|
||||||
| ModuleDeclaration::TSExportAssignment(_)
|
| ModuleDeclaration::TSExportAssignment(_)
|
||||||
| ModuleDeclaration::TSNamespaceExportDeclaration(_) => "export statement",
|
| ModuleDeclaration::TSNamespaceExportDeclaration(_) => "export statement",
|
||||||
};
|
};
|
||||||
let span = Span::new(decl.span().start, decl.span().start + 6);
|
let start = decl.span().start;
|
||||||
|
let span = Span::new(start, start + 6);
|
||||||
match ctx.source_type.module_kind() {
|
match ctx.source_type.module_kind() {
|
||||||
ModuleKind::Script => {
|
ModuleKind::Script => {
|
||||||
ctx.error(ModuleCode(text, span));
|
ctx.error(ModuleCode(text, span));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue