Skip to content

extractPythonControlFlow

reference
1 min readUpdated

Kind: Function

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

Read the guards and the failure handling out of a slice of Python source.

startLine/endLine are 1-based and inclusive, and default to the whole file — a parser passes the span of the class or the handler it is describing, and everything reported is inside it.

Signature

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

Parameters

NameType
sourcestring
startLinenumber
endLinenumber

Returns: ControlFlow

Was this page helpful?

Download as PDF