JanetDocsI'm feeling luckyGithub sign in

run-context



    function
    boot.janet on line 2058, column 1

    (run-context opts)
    
    Run a context. This evaluates expressions in an environment, and is
    encapsulates the parsing, compilation, and evaluation. Returns (in
    environment :exit-value environment) when complete. opts is a table or
    struct of options. The options are as follows:
    
       :chunks - callback to read into a buffer - default is getline
       :on-parse-error - callback when parsing fails - default is
    bad-parse
       :env - the environment to compile against - default is the current
    env
       :source - string path of source for better errors - default is
    "<anonymous>"
       :on-compile-error - callback when compilation fails - default is
    bad-compile
       :evaluator - callback that executes thunks. Signature is (evaluator
    thunk source env where)
       :on-status - callback when a value is evaluated - default is
    debug/stacktrace
       :fiber-flags - what flags to wrap the compilation fiber with.
    Default is :ia.
       :expander - an optional function that is called on each top level
    form before being compiled.


0 examplesSign in to add an example
Loading...