README

tonyfettes/starlark/eval does not have a README file

#
StarlarkError

pub(all) suberror StarlarkError {
TypeError(String,
Span
)
NameError(String,
Span
)
ValueError(String,
Span
)
IndexError(String,
Span
)
KeyError(String,
Span
)
} derive(Eq, Show, ToJson)

#
Environment

pub(all) struct Environment {
loader : (String) -> String raise?
module_cache : Map[String, Map[String,
Value
]]
predeclared : Map[String,
Value
]
}

#
Environment::new

fn Environment::new(loader? : (String) -> String raise?) -> Environment

#
Scope

pub(all) struct Scope {
bindings : Map[String,
Value
]
parent : Scope?
env : Environment?
}

#
Scope::get

fn Scope::get(self : Scope, name : String) ->
Value
?

#
Scope::get_env

fn Scope::get_env(self : Scope) -> Environment?

Walk up the scope chain to find the Environment.

#
Scope::new

fn Scope::new(parent? : Scope, env? : Environment) -> Scope

#
Scope::set

fn Scope::set(self : Scope, name : String, value :
Value
) -> Unit

#
Scope::with_builtins

fn Scope::with_builtins(loader? : (String) -> String raise?) -> Scope

#
eval_stmts

fn eval_stmts(scope : Scope, stmts : Array[
Stmt
]) -> Unit raise

#
exec_module

fn exec_module(scope : Scope, stmts : Array[
Stmt
]) -> Unit raise

#
predeclared_builtins

fn predeclared_builtins() -> Map[String,
Value
]

Returns a map of all predeclared Starlark built-in functions.

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io