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

Function NewFlowSwitchClauseData

internal/ast/flow.go:50–56  ·  view source on GitHub ↗
(switchStatement *Node, clauseStart int, clauseEnd int)

Source from the content-addressed store, hash-verified

48}
49
50func NewFlowSwitchClauseData(switchStatement *Node, clauseStart int, clauseEnd int) *Node {
51 node := &FlowSwitchClauseData{}
52 node.SwitchStatement = switchStatement
53 node.ClauseStart = int32(clauseStart)
54 node.ClauseEnd = int32(clauseEnd)
55 return newNode(KindUnknown, node, NodeFactoryHooks{})
56}
57
58func (node *FlowSwitchClauseData) IsEmpty() bool {
59 return node.ClauseStart == node.ClauseEnd

Callers 1

Calls 1

newNodeFunction · 0.85

Tested by

no test coverage detected