Struct Ident¶
- Defined in File ASTNode.h
Inheritance Relationships¶
Base Type¶
public AST::ASTNode(Struct ASTNode)
Struct Documentation¶
-
struct
Ident: public AST::ASTNode¶ Public Functions
-
Ident(const char *txt)¶
-
void
print_original_src(unsigned int indent_depth = 0)¶
-
bool
check_initialize_before_use(InitializedList &inits, InitializedList *all_inits, bool is_method)¶
-
bool
check_ident_initialized(InitializedList &inits, InitializedList *all_inits, bool is_field = false)¶ Generalized function for checking identifiers including constructor identifiers.
- Return
- True if the identifier is initialized
- Parameters
inits: Initialized variable setall_inits: All initialized variables so faris_field: True if the identifier corresponds to a field
-
void
update_initialized_list(InitializedList &inits, bool is_constructor)¶ Adds the implicit identifier to the initialized variable list. If this function is called directly, the initialized variable is marked as not a field of the class.
- Parameters
inits: Set of initialized variables.is_constructor: True if the function is a constructor. It has no effect in this function.
-
void
add_identifier_to_initialized(InitializedList &inits, bool is_field)¶ Add the identifier to the initialized variable list.
- Parameters
inits: Set of initialized variablesis_field: True if the identifier corresponds to a field.
-
bool
update_inferred_type(TypeCheck::Settings &settings, Quack::Class *inferred_type, bool is_field)¶ Updates the symbol table and the node of the symbol in the symbol table and the AST>
- Return
- True if the inferred type was successfully updated
- Parameters
st: Symbol tableinferred_type: Inferred type of the symbol
Public Members
-
const std::string
text_¶ Identifier name
-