mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
refactor(ast, transformer)!: remove StringLiteral::new method (#6788)
This commit is contained in:
parent
a1ca964560
commit
4d2d214ec7
2 changed files with 2 additions and 7 deletions
|
|
@ -9,7 +9,7 @@ use std::{
|
||||||
|
|
||||||
use oxc_allocator::CloneIn;
|
use oxc_allocator::CloneIn;
|
||||||
use oxc_regular_expression::ast::Pattern;
|
use oxc_regular_expression::ast::Pattern;
|
||||||
use oxc_span::{cmp::ContentEq, hash::ContentHash, Atom, Span};
|
use oxc_span::{cmp::ContentEq, hash::ContentHash, Span};
|
||||||
|
|
||||||
use crate::ast::*;
|
use crate::ast::*;
|
||||||
|
|
||||||
|
|
@ -263,11 +263,6 @@ impl fmt::Display for RegExpFlags {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> StringLiteral<'a> {
|
impl<'a> StringLiteral<'a> {
|
||||||
/// Create a new string literal representing the given `value`.
|
|
||||||
pub fn new(span: Span, value: Atom<'a>) -> Self {
|
|
||||||
Self { span, value }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Static Semantics: `IsStringWellFormedUnicode`
|
/// Static Semantics: `IsStringWellFormedUnicode`
|
||||||
/// test for \uD800-\uDFFF
|
/// test for \uD800-\uDFFF
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ impl<'a> ModuleImportsStore<'a> {
|
||||||
let import_stmt = ctx.ast.module_declaration_import_declaration(
|
let import_stmt = ctx.ast.module_declaration_import_declaration(
|
||||||
SPAN,
|
SPAN,
|
||||||
Some(specifiers),
|
Some(specifiers),
|
||||||
StringLiteral::new(SPAN, source),
|
ctx.ast.string_literal(SPAN, source),
|
||||||
NONE,
|
NONE,
|
||||||
ImportOrExportKind::Value,
|
ImportOrExportKind::Value,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue