topazc
AST::Type Struct Reference

Structure for describing the type. More...

#include <ast.hpp>

Public Member Functions

 Type (TypeValue t, std::string n, bool ic=false, bool ip=false, bool in=false)
bool operator== (Type &other)
bool operator!= (Type &other)
std::string to_str ()
 Method for convert type to string.

Public Attributes

TypeValue type
std::string name
bool is_const
bool is_ptr
bool is_nullable

Detailed Description

Structure for describing the type.

Definition at line 37 of file ast.hpp.

Constructor & Destructor Documentation

◆ Type()

AST::Type::Type ( TypeValue t,
std::string n,
bool ic = false,
bool ip = false,
bool in = false )
inline

Definition at line 44 of file ast.hpp.

Here is the caller graph for this function:

Member Function Documentation

◆ operator!=()

bool AST::Type::operator!= ( Type & other)
inline

Definition at line 50 of file ast.hpp.

Here is the call graph for this function:

◆ operator==()

bool AST::Type::operator== ( Type & other)
inline

Definition at line 46 of file ast.hpp.

Here is the call graph for this function:

◆ to_str()

std::string AST::Type::to_str ( )
inline

Method for convert type to string.

This method converting AST::Type to std::string. For example constant nullable int in Topaz will be converted as 'const int?'

Returns
The type converted to string

Definition at line 61 of file ast.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ is_const

bool AST::Type::is_const

Flag 'is constant type'

Definition at line 40 of file ast.hpp.

◆ is_nullable

bool AST::Type::is_nullable

Flag 'is nullable type'

Definition at line 42 of file ast.hpp.

◆ is_ptr

bool AST::Type::is_ptr

Flag 'is raw pointer type'

Definition at line 41 of file ast.hpp.

◆ name

std::string AST::Type::name

String name of type

Definition at line 39 of file ast.hpp.

◆ type

TypeValue AST::Type::type

Enum type

Definition at line 38 of file ast.hpp.


The documentation for this struct was generated from the following file:
  • /mnt/disk_ext4_0/topazlang/include/parser/ast.hpp