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

Function IsJumpStatementTarget

internal/ast/utilities.go:2258–2266  ·  view source on GitHub ↗
(node *Node)

Source from the content-addressed store, hash-verified

2256}
2257
2258func IsJumpStatementTarget(node *Node) bool {
2259 if !IsIdentifier(node) {
2260 return false
2261 }
2262 if !IsBreakOrContinueStatement(node.Parent) {
2263 return false
2264 }
2265 return node == node.Parent.Label()
2266}
2267
2268func IsBreakOrContinueStatement(node *Node) bool {
2269 return NodeKindIs(node, KindBreakStatement, KindContinueStatement)

Callers 2

IsLabelNameFunction · 0.85

Calls 3

IsIdentifierFunction · 0.85
LabelMethod · 0.80

Tested by

no test coverage detected