Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupNamed ¶
LookupNamed resolves a symbol ID written in either spelling: the quoted, notation-legal form a model author writes ('My Pkg'::Car), or the unquoted spelling the index records (My Pkg::Car), which keeps working as it did. Model elements come before library homonyms: an ID naming both denotes the model's own element, which is what the client asked about.
func UnquotedName ¶
UnquotedName is the name a notation-legal qualified name states, with the quoting of its unrestricted segments removed, or false for an ID the notation does not read as one whole name.
Types ¶
type Context ¶
type Context struct {
Index *symbols.Index
Resolver *resolve.Resolver
Semantics *semantics.Model
// contains filtered or unexported fields
}
Context holds what converting a symbol to proto needs besides the symbol: its index, and the resolver and semantic model that answer what its declared names refer to. Their memoization is why it is shared per model.
The resolver and semantic model memoize into plain maps, so a shared context must be used by one goroutine at a time; Lock serializes concurrent conversions of the same model.
func NewContext ¶
NewContext builds a conversion context over a symbol index.
type Info ¶
type Info struct {
Id string
Name string
Kind string
Metadata map[string]string
ChildIds []string
TypeInfo *TypeInfo
Multiplicity *Multiplicity
Specializations []*Specialization
Attributes []*Attribute
WithheldLibraryAttributes int32
}
Info contains protobuf-independent facts about a symbol.
type Multiplicity ¶
Multiplicity contains the lower and upper bounds of a symbol's multiplicity.
type Specialization ¶
Specialization describes a declared generalization relationship.