@@ -419,9 +419,9 @@ metac_type_index_t MetaCSemantic_GetType(metac_sema_state_t* self, metac_node_t
419419}
420420
421421metac_sema_stmt_t * MetaCSemantic_doStmtSemantic_ (metac_sema_state_t * self ,
422- metac_stmt_t * stmt ,
423- const char * callFile ,
424- uint32_t callLine )
422+ metac_stmt_t * stmt ,
423+ const char * callFile ,
424+ uint32_t callLine )
425425{
426426 metac_sema_stmt_t * result = 0 ;
427427
@@ -496,6 +496,8 @@ metac_sema_stmt_t* MetaCSemantic_doStmtSemantic_(metac_sema_state_t* self,
496496 metac_scope_owner_t owner = {
497497 SCOPE_OWNER_V (scope_owner_statement , StmtIndex (self , semaDeclStmt ))
498498 };
499+ // We need to remember to close the decl-scopes so we need to keep track of how many we have opend.
500+ // As the decl scopes are invisble to the user and have no closing syntax.
499501 metac_scope_t * declScope =
500502 MetaCScope_PushNewScope (self , self -> CurrentScope , owner );
501503
@@ -1063,7 +1065,7 @@ void SetTypeIndex(metac_type_t typeNode,
10631065 (cast (metac_type_enum_t * ) typeNode )-> TypeIndex = typeIndex ;
10641066 break ;
10651067 case type_index_basic :
1066- ( cast ( metac_type_basic_t * ) typeNode ) -> TypeIndex = typeIndex ;
1068+ // for basic types the type index is always set.
10671069 break ;
10681070 case type_index_tuple :
10691071 (cast (metac_type_tuple_t * )typeNode )-> TypeIndex = typeIndex ;
@@ -1156,7 +1158,7 @@ metac_sema_decl_t* MetaCSemantic_declSemantic(metac_sema_state_t* self,
11561158 sema_decl_variable_t * var = AllocNewSemaVariable (self , v , & result );
11571159 /// XXX FIXME we want to assign a variable serial
11581160 /// after we have determined the storage location ideally.
1159- /// to keep stuff wokring though we just assign the decl hash
1161+ /// to keep stuff working though we just assign the decl hash
11601162
11611163 var -> Hash = v -> Hash ;
11621164 var -> TypeIndex = MetaCSemantic_doTypeSemantic (self , v -> VarType );
0 commit comments