Documentation ¶
Overview ¶
summarize is a library used to produce a FIDL API summary from the FIDL intermediate representation (IR) abstract syntax tree. Please refer to the README.md file in this repository for usage hints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSummariesJSON ¶
func LoadSummariesJSON(rs ...io.Reader) ([][]ElementStr, error)
LoadSummariesJSON loads several the API summaries in the JSON format from the given reader readers. Returns the respective summaries in the order of supplied readers, or the first encountered error.
Types ¶
type Decl ¶
type Decl string
Decl is the underlying type declaration. For `enum Foo : int32`, this will be `int32`.
type Element ¶
type Element interface { // Stringer produces a string representation of this Element. fmt.Stringer // Member returns true if the Element is a member of something. Member() bool // Name returns the fully-qualified name of this Element. For example, // "library/protocol.Method". Name() Name // Serialize converts an Element into a serializable representation. Serialize() ElementStr }
Element describes a single platform surface element. Use Summarize to convert a FIDL AST into Elements.
type ElementStr ¶
type ElementStr struct { Decl `json:"declaration,omitempty"` Kind `json:"kind"` Name `json:"name"` Resourceness `json:"resourceness,omitempty"` Strictness `json:"strictness,omitempty"` Value `json:"value,omitempty"` }
ElementStr is a generic stringly-typed view of an Element. The aim is to keep the structure as flat as possible, and omit fields which have no bearing to the Kind of element represented.
Keep the element ordering sorted.
func (ElementStr) HasStrictness ¶
func (e ElementStr) HasStrictness() bool
HasStrictness returns true if this ElementStr has a notion of strictness, as not all ElementStrs do.
func (ElementStr) IsStrict ¶
func (e ElementStr) IsStrict() bool
IsStrict returns true of this element is strict. The result makes sense only on elements that have a defined strictness.
func (ElementStr) Less ¶
func (e ElementStr) Less(other ElementStr) bool
func (ElementStr) String ¶
func (e ElementStr) String() string
type Resourceness ¶
type Resourceness string
Resourceness is whether the aggregate has resources or not.