Kind: Class
Source: atloria-monorepo/apps/backend-parser/src/parsers/fastapi.parser.ts
FastAPI Parser implementation
Uses regex-based parsing for Python files since we can't use Python AST directly in Node.js
Implements: IParser
Methods
| Method | Signature | Returns |
|---|---|---|
initialize | initialize(config: ParserConfig) | Promise<void> |
canParse | canParse(filePath: string) | boolean |
parseFile | parseFile(filePath: string, content: string) | Promise<ParseResult> |
parseFiles | parseFiles(files: ParseFileInput[]) | Promise<ParseResult[]> |
destroy | destroy() | Promise<void> |
Properties
| Property | Type |
|---|---|
name | any |
version | any |
supportedPatterns | any |
Where it refuses work
FastAPIParserstops the work with an early return when!fileContent.trim().FastAPIParserstops the work with an early return when!this.isFastAPIFile(fileContent).
When something fails
FastAPIParserhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?