TypeScript: test case for whitespace before a rescanned token

This commit is contained in:
Asger F
2018-10-01 15:19:43 +01:00
parent 9146cc26bd
commit a199035a05
3 changed files with 12 additions and 0 deletions

View File

@@ -1,4 +1,9 @@
| regexpTS.ts:2 | console . log ( /foo/g ) ; |
| regexpTS.ts:3 | console . log ( /foo/g ) ; |
| templateLiteralsJS.js:2 | console . log ( ` template~without~placeholders ` ) ; |
| templateLiteralsJS.js:3 | console . log ( ` template~with~placeholder~ ${ x } . ` ) ; |
| templateLiteralsTS.ts:2 | console . log ( `template~without~placeholders` ) ; |
| templateLiteralsTS.ts:3 | console . log ( `template~with~placeholder~${ x }.` ) ; |
| templateLiteralsTS.ts:4 | console . log ( `template~with~placeholder~${ x }.` ) ; |
| templateLiteralsTS.ts:5 | console . log ( `template~with~placeholder~${ x }.` ) ; |
| templateLiteralsTS.ts:6 | console . log ( `template~with~placeholder~${ x }.` ) ; |

View File

@@ -0,0 +1,4 @@
function f() {
console.log(/foo/g);
console.log( /foo/g);
}

View File

@@ -1,4 +1,7 @@
function f(x) {
console.log(`template without placeholders`);
console.log(`template with placeholder ${x}.`);
console.log(`template with placeholder ${x }.`);
console.log(`template with placeholder ${ x}.`);
console.log(`template with placeholder ${ x }.`);
}