github.com/google/skylark (go): Package skylark provides a Skylark interpreter.  Skylark values are represented by the Value interface. The following built-in Value types are known to the evaluator:  Client applications may define new data types that satisfy at least the Value interface.  Such types may provide additional operations by implementing any of these optional interfaces:  Client applications may also define domain-specific functions in Go and make them available to Skylark programs.  Use NewBuiltin to construct a built-in value that wraps a Go function.  The implementation of the Go function may use UnpackArgs to make sense of the positional and keyword arguments provided by the caller.  Skylark's None value is not equal to Go's nil, but nil may be assigned to a Skylark Value.  Be careful to avoid allowing Go nil values to leak into Skylark data structures.  The Compare operation requires two arguments of the same type, but this constraint cannot be expressed in Go's type system. (This is the classic "binary method problem".) So, each Value type's CompareSameType method is a partial function that compares a value only against others of the same type. Use the package's standalone Compare (or Equal) function to compare an arbitrary pair of values.  To parse and evaluate a Skylark source file, use ExecFile.  The Eval function evaluates a single expression.  All evaluator functions require a Thread parameter which defines the "thread-local storage" of a Skylark thread and may be used to plumb application state through Sklyark code and into callbacks.  When evaluation fails it returns an EvalError from which the application may obtain a backtrace of active Skylark calls.
Keywords: go|language|python|skylark