polynote.kernel.interpreter.scal
Container for information about available values, etc from previous cells or predefined things
Container for information about available values, etc from previous cells or predefined things
A State implementation for Scala cells.
A State implementation for Scala cells. It tracks the CellCode and the instance of the cell class, which we'll need to pass into future cells if they use types, classes, etc from this cell.
Ask for completions (if applicable) at the given position in the given code string.
Ask for completions (if applicable) at the given position in the given code string.
The code string in which completions are requested
The position within the code string at which completions are requested
The given State will have the Cell ID of the cell containing the given code, and it will
initially have empty values. Its prev
will point to the State returned by the closes prior
executed cell, or to State.Root if there is no such cell.
Initialize the interpreter, running any predef code and setting up an initial state.
Initialize the interpreter, running any predef code and setting up an initial state.
A State which is the current state of the notebook execution.
An initial state for this interpreter
Overrideable method to inject some pre-defined state (values and imports) into the initial cell.
Overrideable method to inject some pre-defined state (values and imports) into the initial cell. The base implementation
injects the kernel
value, making it available to the notebook. Override to inject more imports or values.
Ask for parameter hints (if applicable) at the given position in the given code string.
Ask for parameter hints (if applicable) at the given position in the given code string.
The code string in which parameter hints are requested
The position within the code string at which parameter hints are requested
The given State will have the Cell ID of the cell containing the given code, and it will
initially have empty values. Its prev
will point to the State returned by the closes prior
executed cell, or to State.Root if there is no such cell.
Run the given code in the given State, returning an updated State.
The code string to be executed
The given State will have the Cell ID of the cell containing the given code, and it will
initially have empty values. Its prev
will point to the State returned by the closes prior
executed cell, or to State.Root if there is no such cell.
Shut down this interpreter, releasing its resources and ending any internally managed tasks or processes
Shut down this interpreter, releasing its resources and ending any internally managed tasks or processes
Transforms the Scala statements, to inject additional things like updating the execution status and ensuring the last expression is captured.
Transforms the Scala statements, to inject additional things like updating the execution status and ensuring the last expression is captured. Override to add additional transformations (don't forget to call super.transformCode!)