(node)
| 46699 | } |
| 46700 | } |
| 46701 | function checkStrictModeLabeledStatement(node) { |
| 46702 | // Grammar checking for labeledStatement |
| 46703 | if (inStrictMode && ts.getEmitScriptTarget(options) >= 2 /* ScriptTarget.ES2015 */) { |
| 46704 | if (ts.isDeclarationStatement(node.statement) || ts.isVariableStatement(node.statement)) { |
| 46705 | errorOnFirstToken(node.label, ts.Diagnostics.A_label_is_not_allowed_here); |
| 46706 | } |
| 46707 | } |
| 46708 | } |
| 46709 | function errorOnFirstToken(node, message, arg0, arg1, arg2) { |
| 46710 | var span = ts.getSpanOfTokenAtPosition(file, node.pos); |
| 46711 | file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, message, arg0, arg1, arg2)); |
no test coverage detected