Deprecate properties. Use hinted cbuffers instead. This opens up to use a structured buffer in that way as well if you want instead.
This commit is contained in:
31
AST.jai
31
AST.jai
@@ -8,11 +8,6 @@ AST_Kind :: enum {
|
||||
Function;
|
||||
Return;
|
||||
|
||||
// @Incomplete(nb): Should these three really be their own block types?
|
||||
// Maybe they at least shouldn't need to have their own tokens...
|
||||
Properties;
|
||||
Meta;
|
||||
Instance;
|
||||
//==
|
||||
// Directives
|
||||
If_Directive;
|
||||
@@ -469,23 +464,19 @@ pretty_print_declaration :: (declaration : *AST_Node, indentation : int, builder
|
||||
append(builder, "#if ");
|
||||
}
|
||||
|
||||
if declaration.kind == .Properties {
|
||||
append(builder, "properties");
|
||||
if declaration.name.count > 0 {
|
||||
print_to_builder(builder, " %", declaration.name);
|
||||
}
|
||||
} else if declaration.kind == .Instance {
|
||||
append(builder, "instance");
|
||||
} else if declaration.kind == .Meta {
|
||||
append(builder, "meta");
|
||||
if declaration.kind == .Struct {
|
||||
append(builder, "struct ");
|
||||
} else if declaration.kind == .CBuffer {
|
||||
append(builder, "constant_buffer ");
|
||||
}
|
||||
else {
|
||||
if declaration.kind == .Struct {
|
||||
append(builder, "struct ");
|
||||
} else if declaration.kind == .CBuffer {
|
||||
append(builder, "constant_buffer ");
|
||||
print_to_builder(builder, "%", declaration.name);
|
||||
|
||||
if declaration.kind == .CBuffer {
|
||||
for hint : declaration.hint_tokens {
|
||||
if hint.string_value.count > 0 {
|
||||
print_to_builder(builder, " (@%)", hint.string_value);
|
||||
}
|
||||
}
|
||||
print_to_builder(builder, "%", declaration.name);
|
||||
}
|
||||
|
||||
if declaration.kind == .Function && declaration.token.kind == .TOKEN_IDENTIFIER{
|
||||
|
||||
Reference in New Issue
Block a user