From 3fdaebf66d39203e86b9ce5d40262945405a6cad Mon Sep 17 00:00:00 2001 From: nielsbross Date: Thu, 18 Sep 2025 10:58:44 +0000 Subject: [PATCH 1/3] Added todo regarding for loop scoping. --- Check.jai | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Check.jai b/Check.jai index 95a7103..5c1f0af 100644 --- a/Check.jai +++ b/Check.jai @@ -6,6 +6,7 @@ //~ nbr: Error reporting TODOs // // [ ] Add and error for using keywords as names, or rename the dx11 keywords in the resulting hlsl shader. +// [ ] Add missing scope in for loop for loop iterator // [x] Improve error reporting on mismatched overloads when types don't match, but arity does. // [x] Improve error reporting for type mismatches in general. It seems like the expect node is not always correct. @@ -1597,6 +1598,7 @@ check_node :: (checker : *Checker, node : *AST_Node) -> Type_Variable_Handle { } case .For; { loop_iterator := node.token; + // @Incomplete: Missing scope here? symbol : Defined_Symbol; symbol.name = loop_iterator.ident_value; From 4c8443702226378edfe26dc450f4690e296721fc Mon Sep 17 00:00:00 2001 From: nielsbross Date: Thu, 18 Sep 2025 11:02:35 +0000 Subject: [PATCH 2/3] Added comment and todo on resource index in type var. --- Check.jai | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Check.jai b/Check.jai index 5c1f0af..9279174 100644 --- a/Check.jai +++ b/Check.jai @@ -7,6 +7,7 @@ // // [ ] Add and error for using keywords as names, or rename the dx11 keywords in the resulting hlsl shader. // [ ] Add missing scope in for loop for loop iterator +// [ ] Maybe we remove the resource index on type variables, seems like we don't need it there. // [x] Improve error reporting on mismatched overloads when types don't match, but arity does. // [x] Improve error reporting for type mismatches in general. It seems like the expect node is not always correct. @@ -82,6 +83,10 @@ Type_Variable :: struct { MAX_TYPE_VARIABLE_CHILDREN :: 32; children : Static_Array(Type_Variable_Handle, MAX_TYPE_VARIABLE_CHILDREN); + //@Incomplete: Should we remove this and do it in the output generation instead? + // Seems kind of superfluous considering we auto-generate it. + // Otherwise if we want to specify it, it should be specified as a hint @binding(index) + // In the case of using hints, we can just have it on the AST node. //@Note(niels): For constant buffers resource_index : u32; From c26fa892eecd55007b6b4c3942279f92c77085f3 Mon Sep 17 00:00:00 2001 From: nielsbross Date: Thu, 18 Sep 2025 11:08:52 +0000 Subject: [PATCH 3/3] Added todos to module --- module.jai | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module.jai b/module.jai index ee699fa..e6a0f33 100644 --- a/module.jai +++ b/module.jai @@ -23,6 +23,11 @@ - [ ] for-each loops - [ ] add parameters to hints (meta properties, resource binding indices if needed) - [ ] consider @entry(stage) syntax instead of the forced keyword +- [ ] Add flags to compiler + - [ ] Generate output flag(s) + - [ ] Possibly final stage flag, so you can just call compile_file and it only does what you need. + - Probably this flag is about which stage you need as the _last_ and not which stages to do, as that doesn't make sense. + - [ ] Multiple output languages? */ add_define :: (env : *Environment, key : string) {