Fix some if directive stuff. Fix a property output issue. Will be deprecated next commit anyway.

This commit is contained in:
2025-09-17 12:30:36 +02:00
parent 7fefe0ecf6
commit 8b2141df16
19 changed files with 174 additions and 95 deletions

View File

@@ -7,12 +7,21 @@
#import "File_Utilities";
/* TODO
- [ ] Remove builtin stringbuilding and replace it with ad-hoc string building when error reporting. In that case we are already building a string anyway, so we can just pass in the string builder
- [x] Remove builtin stringbuilding and replace it with ad-hoc string building when error reporting. In that case we are already building a string anyway, so we can just pass in the string builder
- [ ] Support structured buffers (ro, rw, w)
- [ ] Support mesh and amplification shaders
- [ ] Support compute shaders
- [ ] Support #if
- [x] Support #if at top level
- [x] Support #if at block level
- [ ] Remove properties block and just use hinted constant buffers instead
```
props :: constant_buffer @properties {
[...]
}
```
- [ ] while loops
- [ ] for-each loops
- [ ]
*/
add_define :: (env : *Environment, key : string) {
@@ -453,6 +462,7 @@ generate_output_data :: (ctx : *Compiler_Context) {
find_result := find_symbol(*ctx.scope_stack, ctx.property_name, xx 1);
if find_result {
property_variable := from_handle(ctx.type_variables, find_result.type_variable);
for i : 0..property_variable.children.count - 1 {