File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1070,6 +1070,15 @@ export class Tokenizer extends DiagnosticEmitter {
10701070 var quote = text . charCodeAt ( pos ++ ) ;
10711071 var start = pos ;
10721072 var result = "" ;
1073+
1074+ if ( quote == CharCode . BACKTICK ) {
1075+ this . warning (
1076+ DiagnosticCode . Not_implemented_0 ,
1077+ this . range ( start - 1 , end ) ,
1078+ "Template Literals can only be used for multi-line strings. Interpolation is not supported."
1079+ ) ;
1080+ }
1081+
10731082 while ( true ) {
10741083 if ( pos >= end ) {
10751084 result += text . substring ( start , pos ) ;
Original file line number Diff line number Diff line change 70707 _ ;
71711. a ;
72722.0 b ;
73+ `123` ;
7374
7475// technically invalid, but not handled by AS yet, TS1005: ';' expected
75763 4 ;
Original file line number Diff line number Diff line change 6767a ;
68682 ;
6969b ;
70+ "123" ;
70713 ;
71724 ;
72735 ;
8283// ERROR 6188: "Numeric separators are not allowed here." in literals.ts(70,2+0)
8384// ERROR 1351: "An identifier or keyword cannot immediately follow a numeric literal." in literals.ts(71,3+0)
8485// ERROR 1351: "An identifier or keyword cannot immediately follow a numeric literal." in literals.ts(72,4+0)
86+ // WARNING 100: "Not implemented: Template Literals can only be used for multi-line strings. Interpolation is not supported." in literals.ts(73,1+102)
You can’t perform that action at this time.
0 commit comments