diff --git a/crates/oxc_ast/src/ast/literal.rs b/crates/oxc_ast/src/ast/literal.rs index 0a3339409..937dca5ae 100644 --- a/crates/oxc_ast/src/ast/literal.rs +++ b/crates/oxc_ast/src/ast/literal.rs @@ -137,7 +137,9 @@ pub enum RegExpPattern<'a> { pub struct StringLiteral<'a> { /// Node location in source code pub span: Span, - /// The string as it appears in source code + /// The value of the string. + /// + /// Any escape sequences in the raw code are unescaped. pub value: Atom<'a>, } diff --git a/crates/oxc_ast/src/generated/ast_builder.rs b/crates/oxc_ast/src/generated/ast_builder.rs index 26f315dfa..a1f86db29 100644 --- a/crates/oxc_ast/src/generated/ast_builder.rs +++ b/crates/oxc_ast/src/generated/ast_builder.rs @@ -196,7 +196,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn string_literal(self, span: Span, value: A) -> StringLiteral<'a> where @@ -211,7 +211,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn alloc_string_literal(self, span: Span, value: A) -> Box<'a, StringLiteral<'a>> where @@ -467,7 +467,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn expression_string_literal(self, span: Span, value: A) -> Expression<'a> where @@ -7165,7 +7165,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn import_attribute_key_string_literal( self, @@ -7552,7 +7552,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn module_export_name_string_literal(self, span: Span, value: A) -> ModuleExportName<'a> where @@ -7766,7 +7766,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn ts_enum_member_name_string_literal(self, span: Span, value: A) -> TSEnumMemberName<'a> where @@ -7929,7 +7929,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn ts_literal_string_literal(self, span: Span, value: A) -> TSLiteral<'a> where @@ -10979,7 +10979,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn ts_module_declaration_name_string_literal( self, @@ -11377,7 +11377,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn ts_import_attribute_name_string_literal( self, @@ -12771,7 +12771,7 @@ impl<'a> AstBuilder<'a> { /// /// ## Parameters /// - span: Node location in source code - /// - value: The string as it appears in source code + /// - value: The value of the string. #[inline] pub fn jsx_attribute_value_string_literal( self,