|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
Represents a parsed type specifier. More...
#include <bond/compiler/parsenodes.h>
Public Member Functions | |
| TypeSpecifier (const Token *primitiveType, QualifiedIdentifier *identifier=nullptr) | |
| Constructs a type specifier from a primitive token and optional identifier. | |
| TypeSpecifier (QualifiedIdentifier *identifier) | |
| Constructs a non-primitive type specifier from an identifier. | |
| TypeSpecifier (const Token *primitiveType, QualifiedIdentifier *identifier, const Symbol *definition) | |
| Constructs a fully specified type specifier. | |
| virtual | ~TypeSpecifier () |
| virtual void | Accept (ParseNodeVisitor &visitor) override |
| Dispatches this node to the given visitor. | |
| virtual void | Accept (ParseNodeVisitor &visitor) const override |
| Dispatches this node to the given visitor. | |
| virtual const Token * | GetContextToken () const override |
| Returns the token used as source context for diagnostics. | |
| const Token * | GetPrimitiveTypeToken () const |
| Returns the primitive type token. | |
| QualifiedIdentifier * | GetIdentifier () |
| Returns the qualified identifier for this type. | |
| const QualifiedIdentifier * | GetIdentifier () const |
| Returns the qualified identifier for this type. | |
| const Symbol * | GetDefinition () const |
| Returns the resolved symbol definition for this type. | |
| void | SetDefinition (const Symbol *symbol) |
| Sets the resolved symbol definition for this type. | |
| bool | IsResolved () const |
| Returns true if this type specifier has been resolved. | |
| bool | IsInstantiable () const |
| Returns true if values of this type can be instantiated. | |
| uint32_t | GetSize (PointerSize pointerSize) const |
| Returns the object size of this type. | |
| uint32_t | GetAlignment () const |
| Returns the alignment of this type. | |
| SignatureType | GetSignatureType () const |
| Returns the signature encoding type for this type. | |
| Token::TokenType | GetPrimitiveType () const |
| Returns the primitive token type, if applicable. | |
| bool | IsBooleanType () const |
| Returns true if this type is boolean. | |
| bool | IsCharType () const |
| Returns true if this type is character. | |
| bool | IsIntegerType () const |
| Returns true if this type is integer. | |
| bool | IsLeast32IntegerType () const |
| Returns true if this type is at least 32-bit integer. | |
| bool | IsMost32IntegerType () const |
| Returns true if this type is at most 32-bit integer. | |
| bool | IsNumericType () const |
| Returns true if this type is numeric. | |
| bool | IsVoidType () const |
| Returns true if this type is void. | |
| bool | IsStructType () const |
| Returns true if this type is a struct type. | |
| Public Member Functions inherited from Bond::ParseNode | |
| virtual | ~ParseNode () |
Additional Inherited Members | |
| Protected Member Functions inherited from Bond::ParseNode | |
| ParseNode () | |
Represents a parsed type specifier.
|
inlineexplicit |
Constructs a type specifier from a primitive token and optional identifier.
| primitiveType | Primitive type token, or null for non-primitive types. |
| identifier | Optional qualified identifier for user-defined types. |
|
inlineexplicit |
Constructs a non-primitive type specifier from an identifier.
| identifier | Qualified identifier for the referenced type. |
|
inline |
Constructs a fully specified type specifier.
| primitiveType | Primitive type token, or null for non-primitive types. |
| identifier | Qualified identifier for user-defined types. |
| definition | Resolved symbol definition for this type. |
|
inlinevirtual |
|
inlineoverridevirtual |
Dispatches this node to the given visitor.
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
|
inlineoverridevirtual |
Dispatches this node to the given visitor.
| visitor | Visitor that handles this node type. |
Implements Bond::ParseNode.
| uint32_t Bond::TypeSpecifier::GetAlignment | ( | ) | const |
Returns the alignment of this type.
|
overridevirtual |
Returns the token used as source context for diagnostics.
Implements Bond::ParseNode.
|
inline |
Returns the resolved symbol definition for this type.
|
inline |
Returns the qualified identifier for this type.
|
inline |
Returns the qualified identifier for this type.
| Token::TokenType Bond::TypeSpecifier::GetPrimitiveType | ( | ) | const |
Returns the primitive token type, if applicable.
|
inline |
Returns the primitive type token.
| SignatureType Bond::TypeSpecifier::GetSignatureType | ( | ) | const |
Returns the signature encoding type for this type.
| uint32_t Bond::TypeSpecifier::GetSize | ( | PointerSize | pointerSize | ) | const |
Returns the object size of this type.
| pointerSize | Target pointer size. |
| bool Bond::TypeSpecifier::IsBooleanType | ( | ) | const |
Returns true if this type is boolean.
| bool Bond::TypeSpecifier::IsCharType | ( | ) | const |
Returns true if this type is character.
| bool Bond::TypeSpecifier::IsInstantiable | ( | ) | const |
Returns true if values of this type can be instantiated.
| bool Bond::TypeSpecifier::IsIntegerType | ( | ) | const |
Returns true if this type is integer.
| bool Bond::TypeSpecifier::IsLeast32IntegerType | ( | ) | const |
Returns true if this type is at least 32-bit integer.
| bool Bond::TypeSpecifier::IsMost32IntegerType | ( | ) | const |
Returns true if this type is at most 32-bit integer.
| bool Bond::TypeSpecifier::IsNumericType | ( | ) | const |
Returns true if this type is numeric.
| bool Bond::TypeSpecifier::IsResolved | ( | ) | const |
Returns true if this type specifier has been resolved.
| bool Bond::TypeSpecifier::IsStructType | ( | ) | const |
Returns true if this type is a struct type.
| bool Bond::TypeSpecifier::IsVoidType | ( | ) | const |
Returns true if this type is void.
|
inline |
Sets the resolved symbol definition for this type.
| symbol | Symbol that defines this type. |