MCPcopy Create free account
hub / github.com/microsoft/typescript-go / checkStrictModeLabeledStatement

Method checkStrictModeLabeledStatement

internal/binder/binder.go:1439–1445  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

1437}
1438
1439func (b *Binder) checkStrictModeLabeledStatement(node *ast.Node) {
1440 // Grammar checking for labeledStatement
1441 data := node.AsLabeledStatement()
1442 if ast.IsDeclarationStatement(data.Statement) || ast.IsVariableStatement(data.Statement) {
1443 b.errorOnFirstToken(data.Label, diagnostics.A_label_is_not_allowed_here)
1444 }
1445}
1446
1447func isEvalOrArgumentsIdentifier(node *ast.Node) bool {
1448 if ast.IsIdentifier(node) {

Callers 1

bindMethod · 0.95

Calls 4

errorOnFirstTokenMethod · 0.95
IsDeclarationStatementFunction · 0.92
IsVariableStatementFunction · 0.92
AsLabeledStatementMethod · 0.80

Tested by

no test coverage detected