Core: Misc

This commit is contained in:
Krzosa Karol
2023-04-22 13:28:01 +02:00
parent 654d6f17e4
commit b51a2080d2
5 changed files with 5 additions and 27 deletions

View File

@@ -1,25 +1,3 @@
/*@language_todo: labeled block :LabeledBlock
It acts just like a scope in C.
BUT it can be turned into a goto label by adding another semicolon
at the end.
:block
thing := 1
thing2 := thing
:label_without_block
thing := 1
:goto_block:
thing := 1
thing2 := thing
:goto_block: for
*/
#import "raylib.core" #import "raylib.core"
A :: #load "array.core" A :: #load "array.core"
MAP :: #load "map.core" MAP :: #load "map.core"

View File

@@ -630,7 +630,8 @@ struct Ast_Decl : Ast {
uint64_t operator_overload_arguments_hash; uint64_t operator_overload_arguments_hash;
Ast_Operator_Info *overload_op_info; Ast_Operator_Info *overload_op_info;
// @todo: move this to Ast_Poly // @todo: move this to Ast_Poly, perhaps this change needs to be combined with
// the change to lambda where they stop being expressions
uint64_t polymorph_hash; uint64_t polymorph_hash;
Array<Ast_Type *> polymorph_resolved_parameter_types; Array<Ast_Type *> polymorph_resolved_parameter_types;
Array<Ast_Decl *> polymorph_parameters; Array<Ast_Decl *> polymorph_parameters;

View File

@@ -1,7 +1,6 @@
/* /*
Features Features
- Labeled blocks / gotos :LabeledBlock
- Add := for default arguments in lambda. (a := false, b := false) - Add := for default arguments in lambda. (a := false, b := false)
- Add struct default values. - Add struct default values.
- Add for loop: - Add for loop:

View File

@@ -338,7 +338,7 @@ Ast *ast_copy(Ast *ast, Ast_Scope *parent_scope, Array<Poly_Replacement> *repl)
case AST_UNION: case AST_UNION:
case AST_ENUM: case AST_ENUM:
case AST_LAMBDA: case AST_LAMBDA:
case AST_TYPE: // @cleanup: what is this used for? case AST_TYPE:
case AST_CONST: case AST_CONST:
case AST_VAR: { case AST_VAR: {
Ast_Decl *src = (Ast_Decl *)ast; Ast_Decl *src = (Ast_Decl *)ast;

View File

@@ -1167,7 +1167,7 @@ resolve_expr(Ast_Expr *ast, Resolve_Flag flags, Ast_Type *compound_and_const_str
// @consider: Maybe instead of using AST_IDENT another case should be // @consider: Maybe instead of using AST_IDENT another case should be
// added like AST_RESOLVED or something because currently the identifier // added like AST_RESOLVED or something because currently the identifier
// is a bit bogus. // can already be resolved and stuff like that
// if (node->intern_val == pctx->intern("MAP"_s)) { // if (node->intern_val == pctx->intern("MAP"_s)) {
// __debugbreak(); // __debugbreak();