fork of hey-api/openapi-ts because I need some additional things
1import type { PyNode, PyNodeBase } from '../base';
2import { PyNodeKind } from '../kinds';
3
4export interface PySourceFile extends PyNodeBase {
5 docstring?: string;
6 kind: PyNodeKind.SourceFile;
7 statements: ReadonlyArray<PyNode>;
8}
9
10export function createSourceFile(
11 statements: ReadonlyArray<PyNode>,
12 docstring?: string,
13 leadingComments?: ReadonlyArray<string>,
14 trailingComments?: ReadonlyArray<string>,
15): PySourceFile {
16 return {
17 docstring,
18 kind: PyNodeKind.SourceFile,
19 leadingComments,
20 statements,
21 trailingComments,
22 };
23}