-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support top-level await in Python. Fixes #18
- Loading branch information
1 parent
119dadf
commit 382e6f2
Showing
4 changed files
with
52 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,4 +129,4 @@ script[type="text/notebook-cell"] { | |
|
||
margin-top: 25px; | ||
margin-bottom: 25px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import { LanguageSupport } from "@codemirror/language"; | ||
|
||
export type OutputLine = { | ||
type: 'log' | 'error' | 'warn'; | ||
type: "log" | "error" | "warn"; | ||
line: string; | ||
}; | ||
|
||
export abstract class Kernel { | ||
requestID: number = 0; | ||
getRequestID() { | ||
return this.requestID++; | ||
return this.requestID++; | ||
} | ||
|
||
abstract run(code: string, onOutput: (line: OutputLine) => void, onDone: () => void); | ||
abstract run( | ||
code: string, | ||
onOutput: (line: OutputLine) => void, | ||
onDone: () => void | ||
); | ||
abstract getSyntaxHighlighter(): LanguageSupport; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters