@@ -276,27 +276,32 @@ impl<'a> AstBuilder<'a> {
276
276
Expression :: StringLiteral ( self . alloc_string_literal ( span, value, raw) )
277
277
}
278
278
279
- /// Build an [`Expression::StringLiteral`] with `lossy `.
279
+ /// Build an [`Expression::StringLiteral`] with `lone_surrogates `.
280
280
///
281
281
/// This node contains a [`StringLiteral`] that will be stored in the memory arena.
282
282
///
283
283
/// ## Parameters
284
284
/// * `span`: Node location in source code
285
285
/// * `value`: The value of the string.
286
286
/// * `raw`: The raw string as it appears in source code.
287
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
287
+ /// * `lone_surrogates `: The string value contains lone surrogates .
288
288
#[ inline]
289
- pub fn expression_string_literal_with_lossy < A > (
289
+ pub fn expression_string_literal_with_lone_surrogates < A > (
290
290
self ,
291
291
span : Span ,
292
292
value : A ,
293
293
raw : Option < Atom < ' a > > ,
294
- lossy : bool ,
294
+ lone_surrogates : bool ,
295
295
) -> Expression < ' a >
296
296
where
297
297
A : IntoIn < ' a , Atom < ' a > > ,
298
298
{
299
- Expression :: StringLiteral ( self . alloc_string_literal_with_lossy ( span, value, raw, lossy) )
299
+ Expression :: StringLiteral ( self . alloc_string_literal_with_lone_surrogates (
300
+ span,
301
+ value,
302
+ raw,
303
+ lone_surrogates,
304
+ ) )
300
305
}
301
306
302
307
/// Build an [`Expression::TemplateLiteral`].
@@ -7843,25 +7848,30 @@ impl<'a> AstBuilder<'a> {
7843
7848
ImportAttributeKey :: StringLiteral ( self . string_literal ( span, value, raw) )
7844
7849
}
7845
7850
7846
- /// Build an [`ImportAttributeKey::StringLiteral`] with `lossy `.
7851
+ /// Build an [`ImportAttributeKey::StringLiteral`] with `lone_surrogates `.
7847
7852
///
7848
7853
/// ## Parameters
7849
7854
/// * `span`: Node location in source code
7850
7855
/// * `value`: The value of the string.
7851
7856
/// * `raw`: The raw string as it appears in source code.
7852
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
7857
+ /// * `lone_surrogates `: The string value contains lone surrogates .
7853
7858
#[ inline]
7854
- pub fn import_attribute_key_string_literal_with_lossy < A > (
7859
+ pub fn import_attribute_key_string_literal_with_lone_surrogates < A > (
7855
7860
self ,
7856
7861
span : Span ,
7857
7862
value : A ,
7858
7863
raw : Option < Atom < ' a > > ,
7859
- lossy : bool ,
7864
+ lone_surrogates : bool ,
7860
7865
) -> ImportAttributeKey < ' a >
7861
7866
where
7862
7867
A : IntoIn < ' a , Atom < ' a > > ,
7863
7868
{
7864
- ImportAttributeKey :: StringLiteral ( self . string_literal_with_lossy ( span, value, raw, lossy) )
7869
+ ImportAttributeKey :: StringLiteral ( self . string_literal_with_lone_surrogates (
7870
+ span,
7871
+ value,
7872
+ raw,
7873
+ lone_surrogates,
7874
+ ) )
7865
7875
}
7866
7876
7867
7877
/// Build an [`ExportNamedDeclaration`].
@@ -8442,25 +8452,30 @@ impl<'a> AstBuilder<'a> {
8442
8452
ModuleExportName :: StringLiteral ( self . string_literal ( span, value, raw) )
8443
8453
}
8444
8454
8445
- /// Build a [`ModuleExportName::StringLiteral`] with `lossy `.
8455
+ /// Build a [`ModuleExportName::StringLiteral`] with `lone_surrogates `.
8446
8456
///
8447
8457
/// ## Parameters
8448
8458
/// * `span`: Node location in source code
8449
8459
/// * `value`: The value of the string.
8450
8460
/// * `raw`: The raw string as it appears in source code.
8451
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
8461
+ /// * `lone_surrogates `: The string value contains lone surrogates .
8452
8462
#[ inline]
8453
- pub fn module_export_name_string_literal_with_lossy < A > (
8463
+ pub fn module_export_name_string_literal_with_lone_surrogates < A > (
8454
8464
self ,
8455
8465
span : Span ,
8456
8466
value : A ,
8457
8467
raw : Option < Atom < ' a > > ,
8458
- lossy : bool ,
8468
+ lone_surrogates : bool ,
8459
8469
) -> ModuleExportName < ' a >
8460
8470
where
8461
8471
A : IntoIn < ' a , Atom < ' a > > ,
8462
8472
{
8463
- ModuleExportName :: StringLiteral ( self . string_literal_with_lossy ( span, value, raw, lossy) )
8473
+ ModuleExportName :: StringLiteral ( self . string_literal_with_lone_surrogates (
8474
+ span,
8475
+ value,
8476
+ raw,
8477
+ lone_surrogates,
8478
+ ) )
8464
8479
}
8465
8480
8466
8481
/// Build a [`V8IntrinsicExpression`].
@@ -8598,7 +8613,12 @@ impl<'a> AstBuilder<'a> {
8598
8613
where
8599
8614
A : IntoIn < ' a , Atom < ' a > > ,
8600
8615
{
8601
- StringLiteral { span, value : value. into_in ( self . allocator ) , raw, lossy : Default :: default ( ) }
8616
+ StringLiteral {
8617
+ span,
8618
+ value : value. into_in ( self . allocator ) ,
8619
+ raw,
8620
+ lone_surrogates : Default :: default ( ) ,
8621
+ }
8602
8622
}
8603
8623
8604
8624
/// Build a [`StringLiteral`], and store it in the memory arena.
@@ -8622,50 +8642,53 @@ impl<'a> AstBuilder<'a> {
8622
8642
Box :: new_in ( self . string_literal ( span, value, raw) , self . allocator )
8623
8643
}
8624
8644
8625
- /// Build a [`StringLiteral`] with `lossy `.
8645
+ /// Build a [`StringLiteral`] with `lone_surrogates `.
8626
8646
///
8627
- /// If you want the built node to be allocated in the memory arena, use [`AstBuilder::alloc_string_literal_with_lossy `] instead.
8647
+ /// If you want the built node to be allocated in the memory arena, use [`AstBuilder::alloc_string_literal_with_lone_surrogates `] instead.
8628
8648
///
8629
8649
/// ## Parameters
8630
8650
/// * `span`: Node location in source code
8631
8651
/// * `value`: The value of the string.
8632
8652
/// * `raw`: The raw string as it appears in source code.
8633
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
8653
+ /// * `lone_surrogates `: The string value contains lone surrogates .
8634
8654
#[ inline]
8635
- pub fn string_literal_with_lossy < A > (
8655
+ pub fn string_literal_with_lone_surrogates < A > (
8636
8656
self ,
8637
8657
span : Span ,
8638
8658
value : A ,
8639
8659
raw : Option < Atom < ' a > > ,
8640
- lossy : bool ,
8660
+ lone_surrogates : bool ,
8641
8661
) -> StringLiteral < ' a >
8642
8662
where
8643
8663
A : IntoIn < ' a , Atom < ' a > > ,
8644
8664
{
8645
- StringLiteral { span, value : value. into_in ( self . allocator ) , raw, lossy }
8665
+ StringLiteral { span, value : value. into_in ( self . allocator ) , raw, lone_surrogates }
8646
8666
}
8647
8667
8648
- /// Build a [`StringLiteral`] with `lossy `, and store it in the memory arena.
8668
+ /// Build a [`StringLiteral`] with `lone_surrogates `, and store it in the memory arena.
8649
8669
///
8650
- /// Returns a [`Box`] containing the newly-allocated node. If you want a stack-allocated node, use [`AstBuilder::string_literal_with_lossy `] instead.
8670
+ /// Returns a [`Box`] containing the newly-allocated node. If you want a stack-allocated node, use [`AstBuilder::string_literal_with_lone_surrogates `] instead.
8651
8671
///
8652
8672
/// ## Parameters
8653
8673
/// * `span`: Node location in source code
8654
8674
/// * `value`: The value of the string.
8655
8675
/// * `raw`: The raw string as it appears in source code.
8656
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
8676
+ /// * `lone_surrogates `: The string value contains lone surrogates .
8657
8677
#[ inline]
8658
- pub fn alloc_string_literal_with_lossy < A > (
8678
+ pub fn alloc_string_literal_with_lone_surrogates < A > (
8659
8679
self ,
8660
8680
span : Span ,
8661
8681
value : A ,
8662
8682
raw : Option < Atom < ' a > > ,
8663
- lossy : bool ,
8683
+ lone_surrogates : bool ,
8664
8684
) -> Box < ' a , StringLiteral < ' a > >
8665
8685
where
8666
8686
A : IntoIn < ' a , Atom < ' a > > ,
8667
8687
{
8668
- Box :: new_in ( self . string_literal_with_lossy ( span, value, raw, lossy) , self . allocator )
8688
+ Box :: new_in (
8689
+ self . string_literal_with_lone_surrogates ( span, value, raw, lone_surrogates) ,
8690
+ self . allocator ,
8691
+ )
8669
8692
}
8670
8693
8671
8694
/// Build a [`BigIntLiteral`].
@@ -9444,29 +9467,32 @@ impl<'a> AstBuilder<'a> {
9444
9467
JSXAttributeValue :: StringLiteral ( self . alloc_string_literal ( span, value, raw) )
9445
9468
}
9446
9469
9447
- /// Build a [`JSXAttributeValue::StringLiteral`] with `lossy `.
9470
+ /// Build a [`JSXAttributeValue::StringLiteral`] with `lone_surrogates `.
9448
9471
///
9449
9472
/// This node contains a [`StringLiteral`] that will be stored in the memory arena.
9450
9473
///
9451
9474
/// ## Parameters
9452
9475
/// * `span`: Node location in source code
9453
9476
/// * `value`: The value of the string.
9454
9477
/// * `raw`: The raw string as it appears in source code.
9455
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
9478
+ /// * `lone_surrogates `: The string value contains lone surrogates .
9456
9479
#[ inline]
9457
- pub fn jsx_attribute_value_string_literal_with_lossy < A > (
9480
+ pub fn jsx_attribute_value_string_literal_with_lone_surrogates < A > (
9458
9481
self ,
9459
9482
span : Span ,
9460
9483
value : A ,
9461
9484
raw : Option < Atom < ' a > > ,
9462
- lossy : bool ,
9485
+ lone_surrogates : bool ,
9463
9486
) -> JSXAttributeValue < ' a >
9464
9487
where
9465
9488
A : IntoIn < ' a , Atom < ' a > > ,
9466
9489
{
9467
- JSXAttributeValue :: StringLiteral (
9468
- self . alloc_string_literal_with_lossy ( span, value, raw, lossy) ,
9469
- )
9490
+ JSXAttributeValue :: StringLiteral ( self . alloc_string_literal_with_lone_surrogates (
9491
+ span,
9492
+ value,
9493
+ raw,
9494
+ lone_surrogates,
9495
+ ) )
9470
9496
}
9471
9497
9472
9498
/// Build a [`JSXAttributeValue::ExpressionContainer`].
@@ -9949,27 +9975,32 @@ impl<'a> AstBuilder<'a> {
9949
9975
TSEnumMemberName :: String ( self . alloc_string_literal ( span, value, raw) )
9950
9976
}
9951
9977
9952
- /// Build a [`TSEnumMemberName::String`] with `lossy `.
9978
+ /// Build a [`TSEnumMemberName::String`] with `lone_surrogates `.
9953
9979
///
9954
9980
/// This node contains a [`StringLiteral`] that will be stored in the memory arena.
9955
9981
///
9956
9982
/// ## Parameters
9957
9983
/// * `span`: Node location in source code
9958
9984
/// * `value`: The value of the string.
9959
9985
/// * `raw`: The raw string as it appears in source code.
9960
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
9986
+ /// * `lone_surrogates `: The string value contains lone surrogates .
9961
9987
#[ inline]
9962
- pub fn ts_enum_member_name_string_with_lossy < A > (
9988
+ pub fn ts_enum_member_name_string_with_lone_surrogates < A > (
9963
9989
self ,
9964
9990
span : Span ,
9965
9991
value : A ,
9966
9992
raw : Option < Atom < ' a > > ,
9967
- lossy : bool ,
9993
+ lone_surrogates : bool ,
9968
9994
) -> TSEnumMemberName < ' a >
9969
9995
where
9970
9996
A : IntoIn < ' a , Atom < ' a > > ,
9971
9997
{
9972
- TSEnumMemberName :: String ( self . alloc_string_literal_with_lossy ( span, value, raw, lossy) )
9998
+ TSEnumMemberName :: String ( self . alloc_string_literal_with_lone_surrogates (
9999
+ span,
10000
+ value,
10001
+ raw,
10002
+ lone_surrogates,
10003
+ ) )
9973
10004
}
9974
10005
9975
10006
/// Build a [`TSTypeAnnotation`].
@@ -10106,27 +10137,32 @@ impl<'a> AstBuilder<'a> {
10106
10137
TSLiteral :: StringLiteral ( self . alloc_string_literal ( span, value, raw) )
10107
10138
}
10108
10139
10109
- /// Build a [`TSLiteral::StringLiteral`] with `lossy `.
10140
+ /// Build a [`TSLiteral::StringLiteral`] with `lone_surrogates `.
10110
10141
///
10111
10142
/// This node contains a [`StringLiteral`] that will be stored in the memory arena.
10112
10143
///
10113
10144
/// ## Parameters
10114
10145
/// * `span`: Node location in source code
10115
10146
/// * `value`: The value of the string.
10116
10147
/// * `raw`: The raw string as it appears in source code.
10117
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
10148
+ /// * `lone_surrogates `: The string value contains lone surrogates .
10118
10149
#[ inline]
10119
- pub fn ts_literal_string_literal_with_lossy < A > (
10150
+ pub fn ts_literal_string_literal_with_lone_surrogates < A > (
10120
10151
self ,
10121
10152
span : Span ,
10122
10153
value : A ,
10123
10154
raw : Option < Atom < ' a > > ,
10124
- lossy : bool ,
10155
+ lone_surrogates : bool ,
10125
10156
) -> TSLiteral < ' a >
10126
10157
where
10127
10158
A : IntoIn < ' a , Atom < ' a > > ,
10128
10159
{
10129
- TSLiteral :: StringLiteral ( self . alloc_string_literal_with_lossy ( span, value, raw, lossy) )
10160
+ TSLiteral :: StringLiteral ( self . alloc_string_literal_with_lone_surrogates (
10161
+ span,
10162
+ value,
10163
+ raw,
10164
+ lone_surrogates,
10165
+ ) )
10130
10166
}
10131
10167
10132
10168
/// Build a [`TSLiteral::TemplateLiteral`].
@@ -13387,27 +13423,30 @@ impl<'a> AstBuilder<'a> {
13387
13423
TSModuleDeclarationName :: StringLiteral ( self . string_literal ( span, value, raw) )
13388
13424
}
13389
13425
13390
- /// Build a [`TSModuleDeclarationName::StringLiteral`] with `lossy `.
13426
+ /// Build a [`TSModuleDeclarationName::StringLiteral`] with `lone_surrogates `.
13391
13427
///
13392
13428
/// ## Parameters
13393
13429
/// * `span`: Node location in source code
13394
13430
/// * `value`: The value of the string.
13395
13431
/// * `raw`: The raw string as it appears in source code.
13396
- /// * `lossy `: The string value contains replacement character (U+FFFD) .
13432
+ /// * `lone_surrogates `: The string value contains lone surrogates .
13397
13433
#[ inline]
13398
- pub fn ts_module_declaration_name_string_literal_with_lossy < A > (
13434
+ pub fn ts_module_declaration_name_string_literal_with_lone_surrogates < A > (
13399
13435
self ,
13400
13436
span : Span ,
13401
13437
value : A ,
13402
13438
raw : Option < Atom < ' a > > ,
13403
- lossy : bool ,
13439
+ lone_surrogates : bool ,
13404
13440
) -> TSModuleDeclarationName < ' a >
13405
13441
where
13406
13442
A : IntoIn < ' a , Atom < ' a > > ,
13407
13443
{
13408
- TSModuleDeclarationName :: StringLiteral (
13409
- self . string_literal_with_lossy ( span, value, raw, lossy) ,
13410
- )
13444
+ TSModuleDeclarationName :: StringLiteral ( self . string_literal_with_lone_surrogates (
13445
+ span,
13446
+ value,
13447
+ raw,
13448
+ lone_surrogates,
13449
+ ) )
13411
13450
}
13412
13451
13413
13452
/// Build a [`TSModuleDeclarationBody::TSModuleDeclaration`].
0 commit comments