File tree 3 files changed +11
-1
lines changed
tests/baselines/reference/api
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,18 @@ namespace ts {
93
93
return node ;
94
94
}
95
95
96
- function createStringLiteral ( text : string ) : StringLiteral {
96
+ export function createStringLiteral ( text : string ) : StringLiteral {
97
97
const node = < StringLiteral > createSynthesizedNode ( SyntaxKind . StringLiteral ) ;
98
98
node . text = text ;
99
99
return node ;
100
100
}
101
101
102
+ export function createRegularExpressionLiteral ( text : string ) : RegularExpressionLiteral {
103
+ const node = < RegularExpressionLiteral > createSynthesizedNode ( SyntaxKind . RegularExpressionLiteral ) ;
104
+ node . text = text ;
105
+ return node ;
106
+ }
107
+
102
108
function createLiteralFromNode ( sourceNode : PropertyNameLiteral ) : StringLiteral {
103
109
const node = createStringLiteral ( getTextOfIdentifierOrLiteral ( sourceNode ) ) ;
104
110
node . textSourceNode = sourceNode ;
Original file line number Diff line number Diff line change @@ -3484,6 +3484,8 @@ declare namespace ts {
3484
3484
function createLiteral ( value : boolean ) : BooleanLiteral ;
3485
3485
function createLiteral ( value : string | number | boolean ) : PrimaryExpression ;
3486
3486
function createNumericLiteral ( value : string ) : NumericLiteral ;
3487
+ function createStringLiteral ( text : string ) : StringLiteral ;
3488
+ function createRegularExpressionLiteral ( text : string ) : RegularExpressionLiteral ;
3487
3489
function createIdentifier ( text : string ) : Identifier ;
3488
3490
function updateIdentifier ( node : Identifier ) : Identifier ;
3489
3491
/** Create a unique temporary variable. */
Original file line number Diff line number Diff line change @@ -3484,6 +3484,8 @@ declare namespace ts {
3484
3484
function createLiteral ( value : boolean ) : BooleanLiteral ;
3485
3485
function createLiteral ( value : string | number | boolean ) : PrimaryExpression ;
3486
3486
function createNumericLiteral ( value : string ) : NumericLiteral ;
3487
+ function createStringLiteral ( text : string ) : StringLiteral ;
3488
+ function createRegularExpressionLiteral ( text : string ) : RegularExpressionLiteral ;
3487
3489
function createIdentifier ( text : string ) : Identifier ;
3488
3490
function updateIdentifier ( node : Identifier ) : Identifier ;
3489
3491
/** Create a unique temporary variable. */
You can’t perform that action at this time.
0 commit comments