diff --git a/Parsing.jai b/Parsing.jai index 25b9ced..eb65c0f 100644 --- a/Parsing.jai +++ b/Parsing.jai @@ -771,7 +771,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)); } @@ -1108,6 +1107,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 2f81e49..2548276 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; }