struct Constant

Defined at line 168 of file ../../tools/fidl/fidlc/src/values.h

Constant represents the _use_ of a constant. (For the _declaration_, see

Const. For the _value_, see ConstantValue.) A Constant can either be a

reference to another constant (IdentifierConstant), a literal value

(LiteralConstant). Every Constant resolves to a concrete ConstantValue.

Public Members

Kind kind
SourceSpan span
bool compiled
const Type * type

Protected Members

unique_ptr value_

Public Methods

void ~Constant ()

Defined at line 169 of file ../../tools/fidl/fidlc/src/values.h

void Constant (Kind kind, SourceSpan span)

Defined at line 173 of file ../../tools/fidl/fidlc/src/values.h

bool IsResolved ()

Defined at line 175 of file ../../tools/fidl/fidlc/src/values.h

void ResolveTo (std::unique_ptr<ConstantValue> value, const Type * type)
const ConstantValue & Value ()
std::unique_ptr<Constant> Clone ()

Enumerations

enum Kind
Name Value
kIdentifier 0
kLiteral 1
kBinaryOperator 2

Defined at line 171 of file ../../tools/fidl/fidlc/src/values.h