JanetDocsPlaygroundI'm feeling luckyGitHub sign in


    boot.janet on line 2256, column 1

    (run-context opts)

    Run a context. This evaluates expressions in an environment, and 
    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 
    * `:env` - the environment to compile against - default is the 
      current env
    * `:source` - string path of source for better errors - default is 
    * `:on-compile-error` - callback when compilation fails - default 
      is bad-compile
    * `:on-compile-warning` - callback for any linting error - default 
      is warn-compile
    * `:evaluator` - callback that executes thunks. Signature is 
      (evaluator thunk source env where)
    * `:on-status` - callback when a value is evaluated - default is 
    * `: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.
    * `:parser` - provide a custom parser that implements the same 
      interface as Janet's built-in parser.
    * `:read` - optional function to get the next form, called like 
      `(read env source)`. Overrides all parsing.

0 examplesSign in to add an example