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

Method bindWhileStatement

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

Source from the content-addressed store, hash-verified

1855}
1856
1857func (b *Binder) bindWhileStatement(node *ast.Node) {
1858 stmt := node.AsWhileStatement()
1859 preWhileLabel := b.setContinueTarget(node, b.createLoopLabel())
1860 preBodyLabel := b.createBranchLabel()
1861 postWhileLabel := b.createBranchLabel()
1862 b.addAntecedent(preWhileLabel, b.currentFlow)
1863 b.currentFlow = preWhileLabel
1864 b.bindCondition(stmt.Expression, preBodyLabel, postWhileLabel)
1865 b.currentFlow = b.finishFlowLabel(preBodyLabel)
1866 b.bindIterativeStatement(stmt.Statement, postWhileLabel, preWhileLabel)
1867 b.addAntecedent(preWhileLabel, b.currentFlow)
1868 b.currentFlow = b.finishFlowLabel(postWhileLabel)
1869}
1870
1871func (b *Binder) bindDoStatement(node *ast.Node) {
1872 stmt := node.AsDoStatement()

Callers 1

bindChildrenMethod · 0.95

Calls 8

setContinueTargetMethod · 0.95
createLoopLabelMethod · 0.95
createBranchLabelMethod · 0.95
addAntecedentMethod · 0.95
bindConditionMethod · 0.95
finishFlowLabelMethod · 0.95
AsWhileStatementMethod · 0.80

Tested by

no test coverage detected