struct Element
Defined at line 59 of file ../../tools/fidl/fidlc/src/flat_ast.h
Public Members
Kind kind
unique_ptr attributes
Availability availability
Public Methods
void Element (const Element & )
Defined at line 91 of file ../../tools/fidl/fidlc/src/flat_ast.h
void Element (Element && )
Defined at line 92 of file ../../tools/fidl/fidlc/src/flat_ast.h
Element & operator= (Element && )
Defined at line 93 of file ../../tools/fidl/fidlc/src/flat_ast.h
void ~Element ()
Defined at line 94 of file ../../tools/fidl/fidlc/src/flat_ast.h
void Element (Kind kind, std::unique_ptr<AttributeList> attributes)
Defined at line 96 of file ../../tools/fidl/fidlc/src/flat_ast.h
bool IsDecl ()
Returns true if this element is a decl.
Decl * AsDecl ()
Asserts that this element is a decl.
ModifierList * GetModifiers ()
Returns the element's modifiers, or null if it has none.
void ForEachModifier (const fit::function<void (Modifier *)> & fn)
Runs a function on every modifier of the element, if it has any.
bool IsAnonymousLayout ()
Returns true if this is an anonymous layout (i.e. a layout not
directly bound to a type declaration as in `type Foo = struct { ... };`).
std::string_view GetName ()
Returns the element's unqualified name, e.g. "MyProtocol" or "MyMethod".
SourceSpan GetNameSource ()
Returns the source where GetName() comes from, to use in error messages.
Its contents are different from GetName() is the case of anonymous layouts.
std::optional<AbiKind> abi_kind ()
Returns the element's ABI kind, if it has one.
std::optional<AbiValue> abi_value ()
Returns the element's ABI value, if it has one.
Enumerations
enum Kind
| Name | Value |
|---|---|
| kLibrary | 0 |
| kModifier | 1 |
| kAlias | 2 |
| kBits | 3 |
| kBuiltin | 4 |
| kConst | 5 |
| kEnum | 6 |
| kNewType | 7 |
| kOverlay | 8 |
| kProtocol | 9 |
| kResource | 10 |
| kService | 11 |
| kStruct | 12 |
| kTable | 13 |
| kUnion | 14 |
| kBitsMember | 15 |
| kEnumMember | 16 |
| kOverlayMember | 17 |
| kProtocolCompose | 18 |
| kProtocolMethod | 19 |
| kResourceProperty | 20 |
| kServiceMember | 21 |
| kStructMember | 22 |
| kTableMember | 23 |
| kUnionMember | 24 |
Defined at line 60 of file ../../tools/fidl/fidlc/src/flat_ast.h