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

Method Statement

internal/ast/ast.go:1007–1023  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1005}
1006
1007func (n *Node) Statement() *Statement {
1008 switch n.Kind {
1009 case KindDoStatement:
1010 return n.AsDoStatement().Statement
1011 case KindWhileStatement:
1012 return n.AsWhileStatement().Statement
1013 case KindForStatement:
1014 return n.AsForStatement().Statement
1015 case KindForInStatement, KindForOfStatement:
1016 return n.AsForInOrOfStatement().Statement
1017 case KindWithStatement:
1018 return n.AsWithStatement().Statement
1019 case KindLabeledStatement:
1020 return n.AsLabeledStatement().Statement
1021 }
1022 panic("Unhandled case in Node.Statement: " + n.Kind.String())
1023}
1024
1025func (n *Node) PropertyList() *NodeList {
1026 switch n.Kind {

Callers 7

IsCompletedNodeFunction · 0.80
generateNamesMethod · 0.80
checkDoStatementMethod · 0.80
checkWhileStatementMethod · 0.80
checkWithStatementMethod · 0.80
IsIterationStatementFunction · 0.80

Calls 8

AsDoStatementMethod · 0.95
AsWhileStatementMethod · 0.95
AsForStatementMethod · 0.95
AsForInOrOfStatementMethod · 0.95
AsWithStatementMethod · 0.95
AsLabeledStatementMethod · 0.95
panicFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected