package export
import "cuelang.org/go/internal/core/export"
Index ¶
- Variables
- func Def(r adt.Runtime, v *adt.Vertex) (*ast.File, errors.Error)
- func Expr(r adt.Runtime, n adt.Expr) (ast.Expr, errors.Error)
- func ExtractDoc(v *adt.Vertex) (docs []*ast.CommentGroup)
- func ExtractFieldAttrs(a []adt.Conjunct) (attrs []*ast.Attribute)
- func Value(r adt.Runtime, n adt.Value) (ast.Expr, errors.Error)
- func Vertex(r adt.Runtime, n *adt.Vertex) (*ast.File, errors.Error)
- func VertexFeatures(v *adt.Vertex) []adt.Feature
- type Profile
- func (p *Profile) Def(r adt.Runtime, v *adt.Vertex) (*ast.File, errors.Error)
- func (p *Profile) Expr(r adt.Runtime, n adt.Expr) (ast.Expr, errors.Error)
- func (p *Profile) Value(r adt.Runtime, n adt.Value) (ast.Expr, errors.Error)
- func (p *Profile) Vertex(r adt.Runtime, n *adt.Vertex) (*ast.File, errors.Error)
Variables ¶
var All = &Profile{ Simplify: true, ShowOptional: true, ShowDefinitions: true, ShowHidden: true, ShowDocs: true, ShowAttributes: true, }
Functions ¶
func Def ¶
Def exports v as a definition.
func Expr ¶
func ExtractDoc ¶
func ExtractDoc(v *adt.Vertex) (docs []*ast.CommentGroup)
ExtractDoc collects documentation strings for a field.
Comments are attached to a field with a field shorthand belong to the child node. So in the following the comment is attached to field bar.
// comment foo: bar: 2
func ExtractFieldAttrs ¶
func Value ¶
func Vertex ¶
func VertexFeatures ¶
VertexFeatures returns the feature list of v. The list may include more features than for which there are arcs and also includes features for optional fields. It assumes the Structs fields is properly initialized.
Types ¶
type Profile ¶
type Profile struct { Simplify bool // TODO: // IncludeDocs ShowOptional bool ShowDefinitions bool ShowHidden bool ShowDocs bool ShowAttributes bool }
func (*Profile) Def ¶
Def exports v as a definition.
func (*Profile) Expr ¶
func (*Profile) Value ¶
Should take context.
func (*Profile) Vertex ¶
Source Files ¶
adt.go bounds.go export.go expr.go extract.go label.go quote.go toposort.go value.go
- Version
- v0.3.0-alpha1
- Published
- Jul 26, 2020
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 14 minutes ago –
Tools for package owners.