feat: added syntax check
This commit is contained in:
@@ -20,13 +20,28 @@ export type PythonWorkerRequest =
|
||||
requestId: string;
|
||||
code: string;
|
||||
cacheKey?: string;
|
||||
}
|
||||
| {
|
||||
type: 'syntaxCheck';
|
||||
requestId: string;
|
||||
code: string;
|
||||
cacheKey?: string;
|
||||
};
|
||||
|
||||
export interface PythonSyntaxError {
|
||||
line: number;
|
||||
column: number;
|
||||
endLine: number;
|
||||
endColumn: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export type PythonWorkerMessage =
|
||||
| { type: 'ready' }
|
||||
| { type: 'error'; error: string }
|
||||
| { type: 'stdout'; requestId: string; chunk: string }
|
||||
| { type: 'runResult'; requestId: string; result: string }
|
||||
| { type: 'entrypoints'; requestId: string; entrypoints: string[] }
|
||||
| { type: 'syntaxResult'; requestId: string; errors: PythonSyntaxError[] }
|
||||
| { type: 'macroResult'; requestId: string; result: MacroResultV1 }
|
||||
| { type: 'runError'; requestId: string; error: string };
|
||||
|
||||
Reference in New Issue
Block a user