File tree 3 files changed +12
-0
lines changed
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 {
1070
1070
var quote = text . charCodeAt ( pos ++ ) ;
1071
1071
var start = pos ;
1072
1072
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
+
1073
1082
while ( true ) {
1074
1083
if ( pos >= end ) {
1075
1084
result += text . substring ( start , pos ) ;
Original file line number Diff line number Diff line change 70
70
7 _ ;
71
71
1. a ;
72
72
2.0 b ;
73
+ `123` ;
73
74
74
75
// technically invalid, but not handled by AS yet, TS1005: ';' expected
75
76
3 4 ;
Original file line number Diff line number Diff line change 67
67
a ;
68
68
2 ;
69
69
b ;
70
+ "123" ;
70
71
3 ;
71
72
4 ;
72
73
5 ;
82
83
// ERROR 6188: "Numeric separators are not allowed here." in literals.ts(70,2+0)
83
84
// ERROR 1351: "An identifier or keyword cannot immediately follow a numeric literal." in literals.ts(71,3+0)
84
85
// 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