diff --git a/Parsing.jai b/Parsing.jai index 6fda66d..9d31b9f 100644 --- a/Parsing.jai +++ b/Parsing.jai @@ -755,7 +755,6 @@ field_declaration :: (parse_state : *Parse_State, identifier_token : *Token) -> advance(parse_state); } } - } else if match(parse_state, .TOKEN_ASSIGN) { add_child(node, expression(parse_state)); } @@ -1092,6 +1091,18 @@ constant_buffer :: (parse_state : *Parse_State, identifier_token : *Token = null node : *AST_Node; source_location : Source_Range; source_location.begin = parse_state.current; + + if check(parse_state, .TOKEN_AT) { + while check(parse_state, .TOKEN_AT) { + advance(parse_state); + // @Incomplete(niels): this is a mapping + if check(parse_state, .TOKEN_IDENTIFIER) { + array_add(*node.hint_tokens, parse_state.current); + advance(parse_state); + } + } + } + consume(parse_state, .TOKEN_LEFTBRACE, "Expect '{' after 'constant_buffer' keyword"); buffer := field_list(parse_state, .Semicolon); diff --git a/module.jai b/module.jai index 901a1c5..4838c78 100644 --- a/module.jai +++ b/module.jai @@ -119,6 +119,8 @@ Constant_Buffer :: struct { fields : Static_Array(Property_Field, 16); + hint : Field_Hint; // optional hint... + buffer_index : u32; }