class Reference
Defined at line 42 of file ../../tools/fidl/fidlc/src/reference.h
A reference refers to an element by name, and is either sourced or synthetic.
The difference between a name and a reference is that names are definitional,
while references point to names. Some examples:
// `Foo` is a name, `Bar` is a sourced reference
alias Foo = Bar;
// `X` is a name, `some.lib.Y` is a sourced reference
const X = some.lib.Y;
// This enum contains a synthetic reference to the default underlying
// type, fidl.uint32.
type Fruit = enum { APPLE = 1; };
type Baz = struct {
// This struct member contains a synthetic reference to the anonymous
// layout named AnonTable.
anon_table table {};
};
Public Methods
bool IsSynthetic ()
Returns true if this is a synthetic reference.
Defined at line 68 of file ../../tools/fidl/fidlc/src/reference.h
void Reference (const RawCompoundIdentifier & name)
Creates a sourced reference.
void Reference (Target target)
Creates a synthetic reference.
SourceSpan span ()
Returns the span of a sourced reference.
Defined at line 71 of file ../../tools/fidl/fidlc/src/reference.h
const RawSourced & raw_sourced ()
Defined at line 127 of file ../../tools/fidl/fidlc/src/reference.h
const RawSynthetic & raw_synthetic ()
Defined at line 131 of file ../../tools/fidl/fidlc/src/reference.h
const Key & key ()
Defined at line 135 of file ../../tools/fidl/fidlc/src/reference.h
const Contextual & contextual ()
Defined at line 139 of file ../../tools/fidl/fidlc/src/reference.h
const Target & resolved ()
Defined at line 143 of file ../../tools/fidl/fidlc/src/reference.h
State state ()
void SetKey (Key key)
void MarkContextual ()
void ResolveTo (Target target)
void MarkFailed ()
Enumerations
enum State
| Name | Value |
|---|---|
| kRawSourced | 0 |
| kRawSynthetic | 1 |
| kKey | 2 |
| kContextual | 3 |
| kResolved | 4 |
| kFailed | 5 |
Defined at line 73 of file ../../tools/fidl/fidlc/src/reference.h