Skip to content

extractPhpControlFlow

reference
1 min readUpdated

Kind: Function

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

Read the guards and catches out of a span of PHP.

startLine/endLine are 1-based and inclusive, and bound which constructs are collected — the whole file is still masked, because a heredoc or a comment opened above the span decides what the text inside it means.

Signature

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

Parameters

NameType
sourcestring
startLinenumber
endLinenumber

Returns: ControlFlow

Was this page helpful?

Download as PDF
extractPhpControlFlow — Atloria (self dogfood)