Skip to content

extractGoControlFlow

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/parsers/backend/go-control-flow.ts

Read the guards and recover blocks out of a span of Go source.

startLine/endLine are 1-based and inclusive, and are how a caller scopes this to one function; the lines reported back are absolute, so they point into the file the reader opens.

Signature

ts
function extractGoControlFlow(source: string, startLine: number, endLine: number): ControlFlow

Parameters

NameType
sourcestring
startLinenumber
endLinenumber

Returns: ControlFlow

Was this page helpful?

Download as PDF