Documentation
¶
Index ¶
- Variables
- func FmtNode(n ast.Node) string
- func FmtNodeIndent(n ast.Node, level int) string
- func LogAst(root ast.Node)
- func LogNodeTrace(n ast.Node, indentLevel int)
- func PrintAst(root ast.Node, out io.Writer)
- func SafeIdent(name string) string
- func StackAtLoc(root ast.Node, loc ast.Location) (res []ast.Node)
- func StackAtNode(root ast.Node, find ast.Node) (found []ast.Node)
- func WalkStack(node ast.Node, fn func(n ast.Node, stack []ast.Node) bool)
- type Field
- type Function
- type Object
- type Param
- type Resolver
- type Value
- type ValueType
- type Var
- type VarMap
Constants ¶
This section is empty.
Variables ¶
View Source
var StdLibFunctions = map[string]*Function{}/* 112 elements not displayed */
View Source
var StdLibValue = func(fns map[string]*Function) *Value { res := &Value{ Type: ObjectType, Comment: []string{"The built-in jsonnet standard library"}, Object: &Object{ AllFieldsKnown: true, FieldMap: map[string]*Field{}, }, } keys := []string{} for name := range fns { keys = append(keys, name) } sort.Strings(keys) for _, k := range keys { fn := fns[k] res.Object.Fields = append(res.Object.Fields, Field{ Name: k, Type: FunctionType, Comment: []string{k + fn.String()}, }) res.Object.FieldMap[k] = &res.Object.Fields[len(res.Object.Fields)-1] } return res }(StdLibFunctions)
Functions ¶
func LogNodeTrace ¶
Types ¶
type Function ¶
type Param ¶
type Resolver ¶
type Resolver interface {
// Gets the variable with name `name` the ast node `from`
// We need from, as the available variables change depending
// on where in the document the caller is
Vars(from ast.Node) VarMap
NodeAt(loc ast.Location) (node ast.Node, stack []ast.Node)
Import(from, path string) ast.Node
}
type Value ¶
Click to show internal directories.
Click to hide internal directories.