Fix some tests and do some cleanup.

This commit is contained in:
2025-01-01 23:06:53 +01:00
parent f13508262b
commit 4deb07027f
70 changed files with 439 additions and 361 deletions

View File

@@ -1,12 +1,12 @@
test/assign_arithmetic_expression.shd lex parse
test/empty_vertex_main.shd lex parse
test/empty_vertex_main_with_position_parameter.shd lex parse
test/meta_block.shd lex parse
test/basic_property_and_return_value.shd lex parse
test/function_call_return.shd lex parse
test/struct_field_access_test.shd lex parse
test/pass_and_access_struct_fields_in_functions.shd lex parse
test/field_without_type_specifier.shd lex parse
test/functions_with_same_name.shd lex parse
test/function_with_int_return.shd lex parse
test/type_as_variable_name.shd lex parse
test/assign_arithmetic_expression.inx lex parse
test/empty_vertex_main.inx lex parse
test/empty_vertex_main_with_position_parameter.inx lex parse
test/meta_block.inx lex parse
test/basic_property_and_return_value.inx lex parse
test/function_call_return.inx lex parse
test/struct_field_access_test.inx lex parse
test/pass_and_access_struct_fields_in_functions.inx lex parse
test/field_without_type_specifier.inx lex parse
test/functions_with_same_name.inx lex parse
test/function_with_int_return.inx lex parse
test/type_as_variable_name.inx lex parse

View File

@@ -0,0 +1,18 @@
cbuffer camera : register(b0)
{
float4x4 projection;
float4x4 view;
}
float4 vs_main(float4 pos : POSITION) : SV_POSITION
{
float4 mv = mul(camera.view, pos);
float4 mvp = mul(camera.projection, mv);
return mvp;
}
float4 ps_main() : SV_TARGET
{
return float4(0.5f, 0.5f, 0.5f, 1.0f);
}

View File

@@ -1,8 +1,9 @@
cbuffer __PROPERTIES : register(b0)
{
float4 color;
float4 __PROPERTIES__color;
}
float4 vs_main(float4 pos : POSITION) : SV_POSITION
{
return pos;
@@ -10,6 +11,6 @@ float4 vs_main(float4 pos : POSITION) : SV_POSITION
float4 ps_main() : SV_TARGET
{
return color;
return __PROPERTIES__color;
}

View File

@@ -1,20 +1,20 @@
test/assign_arithmetic_expression.shd codegen
test/basic_property_and_return_value.shd codegen
test/complicated_computation.shd codegen
test/constant_buffer.shd codegen
test/empty_struct.shd codegen
test/empty_vertex_main.shd codegen
test/empty_vertex_main_with_position_parameter.shd codegen
test/field_assignment.shd codegen
test/function_call.shd codegen
test/function_call_out_of_order_declaration.shd codegen
test/function_call_return.shd codegen
test/meta_block.shd codegen
test/multiple_functions.shd codegen
test/multiple_semicolons_everywhere.shd codegen
test/pass_and_access_struct_fields_in_functions.shd codegen
test/passthrough.shd codegen
test/property_rename.shd codegen
test/simple_struct_access.shd codegen
test/struct_within_struct.shd codegen
test/use_builtin_functions.shd codegen
test/assign_arithmetic_expression.inx codegen
test/basic_property_and_return_value.inx codegen
test/complicated_computation.inx codegen
test/constant_buffer.inx codegen
test/empty_struct.inx codegen
test/empty_vertex_main.inx codegen
test/empty_vertex_main_with_position_parameter.inx codegen
test/field_assignment.inx codegen
test/function_call.inx codegen
test/function_call_out_of_order_declaration.inx codegen
test/function_call_return.inx codegen
test/meta_block.inx codegen
test/multiple_functions.inx codegen
test/multiple_semicolons_everywhere.inx codegen
test/pass_and_access_struct_fields_in_functions.inx codegen
test/passthrough.inx codegen
test/property_rename.inx codegen
test/simple_struct_access.inx codegen
test/struct_within_struct.inx codegen
test/use_builtin_functions.inx codegen

View File

@@ -1,20 +1,20 @@
test/assign_arithmetic_expression.shd compile
test/basic_property_and_return_value.shd compile
test/complicated_computation.shd compile
test/empty_struct.shd compile
test/empty_vertex_main.shd compile
test/empty_vertex_main_with_position_parameter.shd compile
test/field_assignment.shd compile
test/float_suffix.shd compile
test/function_call.shd compile
test/function_call_out_of_order_declaration.shd compile
test/function_call_return.shd compile
test/functions_with_same_name.shd compile
test/meta_block.shd compile
test/multiple_functions.shd compile
test/multiple_semicolons_everywhere.shd compile
test/pass_and_access_struct_fields_in_functions.shd compile
test/passthrough.shd compile
test/simple_struct_access.shd compile
test/struct_within_struct.shd compile
test/use_builtin_functions.shd compile
test/assign_arithmetic_expression.inx compile
test/basic_property_and_return_value.inx compile
test/complicated_computation.inx compile
test/empty_struct.inx compile
test/empty_vertex_main.inx compile
test/empty_vertex_main_with_position_parameter.inx compile
test/field_assignment.inx compile
test/float_suffix.inx compile
test/function_call.inx compile
test/function_call_out_of_order_declaration.inx compile
test/function_call_return.inx compile
test/functions_with_same_name.inx compile
test/meta_block.inx compile
test/multiple_functions.inx compile
test/multiple_semicolons_everywhere.inx compile
test/pass_and_access_struct_fields_in_functions.inx compile
test/passthrough.inx compile
test/simple_struct_access.inx compile
test/struct_within_struct.inx compile
test/use_builtin_functions.inx compile

View File

@@ -1,66 +1,82 @@
{kind = TOKEN_IDENTIFIER; ; index = 0 ; length = 11 line = 1 ; column = 0 ; value ='Camera_Data'; }
{kind = TOKEN_DOUBLECOLON; ; index = 12 ; length = 2 line = 1 ; column = 12 ; value ='::'; }
{kind = TOKEN_CONSTANT_BUFFER; ; index = 15 ; length = 15 line = 1 ; column = 15 ; value ='constant_buffer'; }
{kind = TOKEN_LEFTBRACE; ; index = 31 ; length = 1 line = 1 ; column = 31 ; value ='{'; }
{kind = TOKEN_IDENTIFIER; ; index = 35 ; length = 10 line = 2 ; column = 0 ; value ='projection'; }
{kind = TOKEN_COLON; ; index = 46 ; length = 1 line = 2 ; column = 11 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 48 ; length = 8 line = 2 ; column = 13 ; value ='float4x4'; }
{kind = TOKEN_SEMICOLON; ; index = 56 ; length = 1 line = 2 ; column = 21 ; value =';'; }
{kind = TOKEN_IDENTIFIER; ; index = 60 ; length = 4 line = 3 ; column = 0 ; value ='view'; }
{kind = TOKEN_COLON; ; index = 71 ; length = 1 line = 3 ; column = 11 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 73 ; length = 8 line = 3 ; column = 13 ; value ='float4x4'; }
{kind = TOKEN_SEMICOLON; ; index = 81 ; length = 1 line = 3 ; column = 21 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 84 ; length = 1 line = 4 ; column = 0 ; value ='}'; }
{kind = TOKEN_VERTEX; ; index = 89 ; length = 6 line = 6 ; column = 0 ; value ='vertex'; }
{kind = TOKEN_IDENTIFIER; ; index = 96 ; length = 4 line = 6 ; column = 7 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 101 ; length = 2 line = 6 ; column = 12 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 104 ; length = 1 line = 6 ; column = 15 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 105 ; length = 3 line = 6 ; column = 16 ; value ='pos'; }
{kind = TOKEN_COLON; ; index = 109 ; length = 1 line = 6 ; column = 20 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 111 ; length = 6 line = 6 ; column = 22 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 118 ; length = 1 line = 6 ; column = 29 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 119 ; length = 8 line = 6 ; column = 30 ; value ='position'; }
{kind = TOKEN_RIGHTPAREN; ; index = 127 ; length = 1 line = 6 ; column = 38 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 129 ; length = 2 line = 6 ; column = 40 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 132 ; length = 6 line = 6 ; column = 43 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 139 ; length = 1 line = 6 ; column = 50 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 140 ; length = 8 line = 6 ; column = 51 ; value ='position'; }
{kind = TOKEN_LEFTBRACE; ; index = 149 ; length = 1 line = 6 ; column = 60 ; value ='{'; }
{kind = TOKEN_RETURN; ; index = 153 ; length = 6 line = 7 ; column = 0 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 160 ; length = 3 line = 7 ; column = 7 ; value ='mul'; }
{kind = TOKEN_LEFTPAREN; ; index = 163 ; length = 1 line = 7 ; column = 10 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 164 ; length = 10 line = 7 ; column = 11 ; value ='projection'; }
{kind = TOKEN_COMMA; ; index = 174 ; length = 1 line = 7 ; column = 21 ; value =','; }
{kind = TOKEN_IDENTIFIER; ; index = 176 ; length = 3 line = 7 ; column = 23 ; value ='mul'; }
{kind = TOKEN_LEFTPAREN; ; index = 179 ; length = 1 line = 7 ; column = 26 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 180 ; length = 4 line = 7 ; column = 27 ; value ='view'; }
{kind = TOKEN_COMMA; ; index = 184 ; length = 1 line = 7 ; column = 31 ; value =','; }
{kind = TOKEN_IDENTIFIER; ; index = 186 ; length = 3 line = 7 ; column = 33 ; value ='pos'; }
{kind = TOKEN_RIGHTPAREN; ; index = 189 ; length = 1 line = 7 ; column = 36 ; value =')'; }
{kind = TOKEN_RIGHTPAREN; ; index = 190 ; length = 1 line = 7 ; column = 37 ; value =')'; }
{kind = TOKEN_SEMICOLON; ; index = 191 ; length = 1 line = 7 ; column = 38 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 194 ; length = 1 line = 8 ; column = 0 ; value ='}'; }
{kind = TOKEN_PIXEL; ; index = 199 ; length = 5 line = 10 ; column = 0 ; value ='pixel'; }
{kind = TOKEN_IDENTIFIER; ; index = 205 ; length = 4 line = 10 ; column = 6 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 210 ; length = 2 line = 10 ; column = 11 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 213 ; length = 1 line = 10 ; column = 14 ; value ='('; }
{kind = TOKEN_RIGHTPAREN; ; index = 214 ; length = 1 line = 10 ; column = 15 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 216 ; length = 2 line = 10 ; column = 17 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 219 ; length = 6 line = 10 ; column = 20 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 226 ; length = 1 line = 10 ; column = 27 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 227 ; length = 6 line = 10 ; column = 28 ; value ='target'; }
{kind = TOKEN_LEFTBRACE; ; index = 234 ; length = 1 line = 10 ; column = 35 ; value ='{'; }
{kind = TOKEN_RETURN; ; index = 238 ; length = 6 line = 11 ; column = 0 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 245 ; length = 5 line = 11 ; column = 7 ; value ='float'; }
{kind = TOKEN_LEFTPAREN; ; index = 250 ; length = 1 line = 11 ; column = 12 ; value ='('; }
{kind = TOKEN_FLOATLITERAL; ; index = 251 ; length = 3 line = 11 ; column = 13 ; value ='0.5'; }
{kind = TOKEN_COMMA; ; index = 254 ; length = 1 line = 11 ; column = 16 ; value =','; }
{kind = TOKEN_FLOATLITERAL; ; index = 256 ; length = 3 line = 11 ; column = 18 ; value ='0.5'; }
{kind = TOKEN_COMMA; ; index = 259 ; length = 1 line = 11 ; column = 21 ; value =','; }
{kind = TOKEN_FLOATLITERAL; ; index = 261 ; length = 3 line = 11 ; column = 23 ; value ='0.5'; }
{kind = TOKEN_COMMA; ; index = 264 ; length = 1 line = 11 ; column = 26 ; value =','; }
{kind = TOKEN_FLOATLITERAL; ; index = 266 ; length = 3 line = 11 ; column = 28 ; value ='1'; }
{kind = TOKEN_RIGHTPAREN; ; index = 269 ; length = 1 line = 11 ; column = 31 ; value =')'; }
{kind = TOKEN_SEMICOLON; ; index = 270 ; length = 1 line = 11 ; column = 32 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 273 ; length = 1 line = 12 ; column = 0 ; value ='}'; }
{kind = TOKEN_EOF; ; index = 276 ; length = 0 line = 13 ; column = 0 ; value =''; }
{kind = TOKEN_IDENTIFIER; ; index = 0 ; length = 6 line = 1 ; column = 0 ; value ='camera'; }
{kind = TOKEN_DOUBLECOLON; ; index = 7 ; length = 2 line = 1 ; column = 7 ; value ='::'; }
{kind = TOKEN_CONSTANT_BUFFER; ; index = 10 ; length = 15 line = 1 ; column = 10 ; value ='constant_buffer'; }
{kind = TOKEN_LEFTBRACE; ; index = 26 ; length = 1 line = 1 ; column = 26 ; value ='{'; }
{kind = TOKEN_IDENTIFIER; ; index = 30 ; length = 10 line = 2 ; column = 0 ; value ='projection'; }
{kind = TOKEN_COLON; ; index = 41 ; length = 1 line = 2 ; column = 11 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 43 ; length = 8 line = 2 ; column = 13 ; value ='float4x4'; }
{kind = TOKEN_SEMICOLON; ; index = 51 ; length = 1 line = 2 ; column = 21 ; value =';'; }
{kind = TOKEN_IDENTIFIER; ; index = 55 ; length = 4 line = 3 ; column = 0 ; value ='view'; }
{kind = TOKEN_COLON; ; index = 66 ; length = 1 line = 3 ; column = 11 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 68 ; length = 8 line = 3 ; column = 13 ; value ='float4x4'; }
{kind = TOKEN_SEMICOLON; ; index = 76 ; length = 1 line = 3 ; column = 21 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 79 ; length = 1 line = 4 ; column = 0 ; value ='}'; }
{kind = TOKEN_VERTEX; ; index = 84 ; length = 6 line = 6 ; column = 0 ; value ='vertex'; }
{kind = TOKEN_IDENTIFIER; ; index = 91 ; length = 4 line = 6 ; column = 7 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 96 ; length = 2 line = 6 ; column = 12 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 99 ; length = 1 line = 6 ; column = 15 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 100 ; length = 3 line = 6 ; column = 16 ; value ='pos'; }
{kind = TOKEN_COLON; ; index = 104 ; length = 1 line = 6 ; column = 20 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 106 ; length = 6 line = 6 ; column = 22 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 113 ; length = 1 line = 6 ; column = 29 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 114 ; length = 8 line = 6 ; column = 30 ; value ='position'; }
{kind = TOKEN_RIGHTPAREN; ; index = 122 ; length = 1 line = 6 ; column = 38 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 124 ; length = 2 line = 6 ; column = 40 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 127 ; length = 6 line = 6 ; column = 43 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 134 ; length = 1 line = 6 ; column = 50 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 135 ; length = 8 line = 6 ; column = 51 ; value ='position'; }
{kind = TOKEN_LEFTBRACE; ; index = 144 ; length = 1 line = 6 ; column = 60 ; value ='{'; }
{kind = TOKEN_IDENTIFIER; ; index = 148 ; length = 2 line = 7 ; column = 0 ; value ='mv'; }
{kind = TOKEN_COLON; ; index = 151 ; length = 1 line = 7 ; column = 3 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 153 ; length = 6 line = 7 ; column = 5 ; value ='float4'; }
{kind = TOKEN_ASSIGN; ; index = 160 ; length = 1 line = 7 ; column = 12 ; value ='='; }
{kind = TOKEN_IDENTIFIER; ; index = 162 ; length = 3 line = 7 ; column = 14 ; value ='mul'; }
{kind = TOKEN_LEFTPAREN; ; index = 165 ; length = 1 line = 7 ; column = 17 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 166 ; length = 6 line = 7 ; column = 18 ; value ='camera'; }
{kind = TOKEN_DOT; ; index = 172 ; length = 1 line = 7 ; column = 24 ; value ='.'; }
{kind = TOKEN_IDENTIFIER; ; index = 173 ; length = 4 line = 7 ; column = 25 ; value ='view'; }
{kind = TOKEN_COMMA; ; index = 177 ; length = 1 line = 7 ; column = 29 ; value =','; }
{kind = TOKEN_IDENTIFIER; ; index = 179 ; length = 3 line = 7 ; column = 31 ; value ='pos'; }
{kind = TOKEN_RIGHTPAREN; ; index = 182 ; length = 1 line = 7 ; column = 34 ; value =')'; }
{kind = TOKEN_SEMICOLON; ; index = 183 ; length = 1 line = 7 ; column = 35 ; value =';'; }
{kind = TOKEN_IDENTIFIER; ; index = 187 ; length = 3 line = 8 ; column = 0 ; value ='mvp'; }
{kind = TOKEN_COLON; ; index = 191 ; length = 1 line = 8 ; column = 4 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 193 ; length = 6 line = 8 ; column = 6 ; value ='float4'; }
{kind = TOKEN_ASSIGN; ; index = 200 ; length = 1 line = 8 ; column = 13 ; value ='='; }
{kind = TOKEN_IDENTIFIER; ; index = 202 ; length = 3 line = 8 ; column = 15 ; value ='mul'; }
{kind = TOKEN_LEFTPAREN; ; index = 205 ; length = 1 line = 8 ; column = 18 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 206 ; length = 6 line = 8 ; column = 19 ; value ='camera'; }
{kind = TOKEN_DOT; ; index = 212 ; length = 1 line = 8 ; column = 25 ; value ='.'; }
{kind = TOKEN_IDENTIFIER; ; index = 213 ; length = 10 line = 8 ; column = 26 ; value ='projection'; }
{kind = TOKEN_COMMA; ; index = 223 ; length = 1 line = 8 ; column = 36 ; value =','; }
{kind = TOKEN_IDENTIFIER; ; index = 225 ; length = 2 line = 8 ; column = 38 ; value ='mv'; }
{kind = TOKEN_RIGHTPAREN; ; index = 227 ; length = 1 line = 8 ; column = 40 ; value =')'; }
{kind = TOKEN_SEMICOLON; ; index = 228 ; length = 1 line = 8 ; column = 41 ; value =';'; }
{kind = TOKEN_RETURN; ; index = 232 ; length = 6 line = 9 ; column = 0 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 239 ; length = 3 line = 9 ; column = 7 ; value ='mvp'; }
{kind = TOKEN_SEMICOLON; ; index = 242 ; length = 1 line = 9 ; column = 10 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 245 ; length = 1 line = 10 ; column = 0 ; value ='}'; }
{kind = TOKEN_PIXEL; ; index = 250 ; length = 5 line = 12 ; column = 0 ; value ='pixel'; }
{kind = TOKEN_IDENTIFIER; ; index = 256 ; length = 4 line = 12 ; column = 6 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 261 ; length = 2 line = 12 ; column = 11 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 264 ; length = 1 line = 12 ; column = 14 ; value ='('; }
{kind = TOKEN_RIGHTPAREN; ; index = 265 ; length = 1 line = 12 ; column = 15 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 267 ; length = 2 line = 12 ; column = 17 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 270 ; length = 6 line = 12 ; column = 20 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 277 ; length = 1 line = 12 ; column = 27 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 278 ; length = 6 line = 12 ; column = 28 ; value ='target'; }
{kind = TOKEN_LEFTBRACE; ; index = 285 ; length = 1 line = 12 ; column = 35 ; value ='{'; }
{kind = TOKEN_RETURN; ; index = 289 ; length = 6 line = 13 ; column = 0 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 296 ; length = 6 line = 13 ; column = 7 ; value ='float4'; }
{kind = TOKEN_LEFTPAREN; ; index = 302 ; length = 1 line = 13 ; column = 13 ; value ='('; }
{kind = TOKEN_FLOATLITERAL; ; index = 303 ; length = 3 line = 13 ; column = 14 ; value ='0.5'; }
{kind = TOKEN_COMMA; ; index = 306 ; length = 1 line = 13 ; column = 17 ; value =','; }
{kind = TOKEN_FLOATLITERAL; ; index = 308 ; length = 3 line = 13 ; column = 19 ; value ='0.5'; }
{kind = TOKEN_COMMA; ; index = 311 ; length = 1 line = 13 ; column = 22 ; value =','; }
{kind = TOKEN_FLOATLITERAL; ; index = 313 ; length = 3 line = 13 ; column = 24 ; value ='0.5'; }
{kind = TOKEN_COMMA; ; index = 316 ; length = 1 line = 13 ; column = 27 ; value =','; }
{kind = TOKEN_FLOATLITERAL; ; index = 318 ; length = 3 line = 13 ; column = 29 ; value ='1'; }
{kind = TOKEN_RIGHTPAREN; ; index = 321 ; length = 1 line = 13 ; column = 32 ; value =')'; }
{kind = TOKEN_SEMICOLON; ; index = 322 ; length = 1 line = 13 ; column = 33 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 325 ; length = 1 line = 14 ; column = 0 ; value ='}'; }
{kind = TOKEN_EOF; ; index = 328 ; length = 0 line = 15 ; column = 0 ; value =''; }

View File

@@ -1,4 +1,4 @@
test/float_suffix.shd:2,12: error: We don't use 'f' suffixes for floating point values.
test/float_suffix.inx:2,12: error: We don't use 'f' suffixes for floating point values.
 x : float = 2.0f
^^^^


View File

@@ -1,45 +1,45 @@
{kind = TOKEN_IDENTIFIER; ; index = 0 ; length = 5 line = 1 ; column = 0 ; value ='props'; }
{kind = TOKEN_COLON; ; index = 6 ; length = 1 line = 1 ; column = 6 ; value =':'; }
{kind = TOKEN_PROPERTIES; ; index = 8 ; length = 10 line = 1 ; column = 8 ; value ='properties'; }
{kind = TOKEN_LEFTBRACE; ; index = 19 ; length = 1 line = 1 ; column = 19 ; value ='{'; }
{kind = TOKEN_IDENTIFIER; ; index = 23 ; length = 5 line = 2 ; column = 0 ; value ='color'; }
{kind = TOKEN_COLON; ; index = 29 ; length = 1 line = 2 ; column = 6 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 31 ; length = 6 line = 2 ; column = 8 ; value ='float4'; }
{kind = TOKEN_SEMICOLON; ; index = 37 ; length = 1 line = 2 ; column = 14 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 40 ; length = 1 line = 3 ; column = 0 ; value ='}'; }
{kind = TOKEN_VERTEX; ; index = 45 ; length = 6 line = 5 ; column = 0 ; value ='vertex'; }
{kind = TOKEN_IDENTIFIER; ; index = 52 ; length = 4 line = 5 ; column = 7 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 57 ; length = 2 line = 5 ; column = 12 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 60 ; length = 1 line = 5 ; column = 15 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 61 ; length = 3 line = 5 ; column = 16 ; value ='pos'; }
{kind = TOKEN_COLON; ; index = 65 ; length = 1 line = 5 ; column = 20 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 67 ; length = 6 line = 5 ; column = 22 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 74 ; length = 1 line = 5 ; column = 29 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 75 ; length = 8 line = 5 ; column = 30 ; value ='position'; }
{kind = TOKEN_RIGHTPAREN; ; index = 83 ; length = 1 line = 5 ; column = 38 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 85 ; length = 2 line = 5 ; column = 40 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 88 ; length = 6 line = 5 ; column = 43 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 95 ; length = 1 line = 5 ; column = 50 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 96 ; length = 8 line = 5 ; column = 51 ; value ='position'; }
{kind = TOKEN_LEFTBRACE; ; index = 105 ; length = 1 line = 5 ; column = 60 ; value ='{'; }
{kind = TOKEN_RETURN; ; index = 109 ; length = 6 line = 6 ; column = 0 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 116 ; length = 3 line = 6 ; column = 7 ; value ='pos'; }
{kind = TOKEN_SEMICOLON; ; index = 119 ; length = 1 line = 6 ; column = 10 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 122 ; length = 1 line = 7 ; column = 0 ; value ='}'; }
{kind = TOKEN_PIXEL; ; index = 127 ; length = 5 line = 9 ; column = 0 ; value ='pixel'; }
{kind = TOKEN_IDENTIFIER; ; index = 133 ; length = 4 line = 9 ; column = 6 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 138 ; length = 2 line = 9 ; column = 11 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 141 ; length = 1 line = 9 ; column = 14 ; value ='('; }
{kind = TOKEN_RIGHTPAREN; ; index = 142 ; length = 1 line = 9 ; column = 15 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 144 ; length = 2 line = 9 ; column = 17 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 147 ; length = 6 line = 9 ; column = 20 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 154 ; length = 1 line = 9 ; column = 27 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 155 ; length = 7 line = 9 ; column = 28 ; value ='target0'; }
{kind = TOKEN_LEFTBRACE; ; index = 163 ; length = 1 line = 9 ; column = 36 ; value ='{'; }
{kind = TOKEN_RETURN; ; index = 169 ; length = 6 line = 10 ; column = 2 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 176 ; length = 5 line = 10 ; column = 9 ; value ='props'; }
{kind = TOKEN_DOT; ; index = 181 ; length = 1 line = 10 ; column = 14 ; value ='.'; }
{kind = TOKEN_IDENTIFIER; ; index = 182 ; length = 5 line = 10 ; column = 15 ; value ='color'; }
{kind = TOKEN_SEMICOLON; ; index = 187 ; length = 1 line = 10 ; column = 20 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 190 ; length = 1 line = 11 ; column = 0 ; value ='}'; }
{kind = TOKEN_EOF; ; index = 193 ; length = 0 line = 12 ; column = 0 ; value =''; }
{kind = TOKEN_IDENTIFIER; ; index = 0 ; length = 5 line = 1 ; column = 0 ; value ='props'; }
{kind = TOKEN_DOUBLECOLON; ; index = 6 ; length = 2 line = 1 ; column = 6 ; value ='::'; }
{kind = TOKEN_PROPERTIES; ; index = 9 ; length = 10 line = 1 ; column = 9 ; value ='properties'; }
{kind = TOKEN_LEFTBRACE; ; index = 20 ; length = 1 line = 1 ; column = 20 ; value ='{'; }
{kind = TOKEN_IDENTIFIER; ; index = 24 ; length = 5 line = 2 ; column = 0 ; value ='color'; }
{kind = TOKEN_COLON; ; index = 30 ; length = 1 line = 2 ; column = 6 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 32 ; length = 6 line = 2 ; column = 8 ; value ='float4'; }
{kind = TOKEN_SEMICOLON; ; index = 38 ; length = 1 line = 2 ; column = 14 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 41 ; length = 1 line = 3 ; column = 0 ; value ='}'; }
{kind = TOKEN_VERTEX; ; index = 46 ; length = 6 line = 5 ; column = 0 ; value ='vertex'; }
{kind = TOKEN_IDENTIFIER; ; index = 53 ; length = 4 line = 5 ; column = 7 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 58 ; length = 2 line = 5 ; column = 12 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 61 ; length = 1 line = 5 ; column = 15 ; value ='('; }
{kind = TOKEN_IDENTIFIER; ; index = 62 ; length = 3 line = 5 ; column = 16 ; value ='pos'; }
{kind = TOKEN_COLON; ; index = 66 ; length = 1 line = 5 ; column = 20 ; value =':'; }
{kind = TOKEN_IDENTIFIER; ; index = 68 ; length = 6 line = 5 ; column = 22 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 75 ; length = 1 line = 5 ; column = 29 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 76 ; length = 8 line = 5 ; column = 30 ; value ='position'; }
{kind = TOKEN_RIGHTPAREN; ; index = 84 ; length = 1 line = 5 ; column = 38 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 86 ; length = 2 line = 5 ; column = 40 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 89 ; length = 6 line = 5 ; column = 43 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 96 ; length = 1 line = 5 ; column = 50 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 97 ; length = 8 line = 5 ; column = 51 ; value ='position'; }
{kind = TOKEN_LEFTBRACE; ; index = 106 ; length = 1 line = 5 ; column = 60 ; value ='{'; }
{kind = TOKEN_RETURN; ; index = 110 ; length = 6 line = 6 ; column = 0 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 117 ; length = 3 line = 6 ; column = 7 ; value ='pos'; }
{kind = TOKEN_SEMICOLON; ; index = 120 ; length = 1 line = 6 ; column = 10 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 123 ; length = 1 line = 7 ; column = 0 ; value ='}'; }
{kind = TOKEN_PIXEL; ; index = 128 ; length = 5 line = 9 ; column = 0 ; value ='pixel'; }
{kind = TOKEN_IDENTIFIER; ; index = 134 ; length = 4 line = 9 ; column = 6 ; value ='main'; }
{kind = TOKEN_DOUBLECOLON; ; index = 139 ; length = 2 line = 9 ; column = 11 ; value ='::'; }
{kind = TOKEN_LEFTPAREN; ; index = 142 ; length = 1 line = 9 ; column = 14 ; value ='('; }
{kind = TOKEN_RIGHTPAREN; ; index = 143 ; length = 1 line = 9 ; column = 15 ; value =')'; }
{kind = TOKEN_ARROW; ; index = 145 ; length = 2 line = 9 ; column = 17 ; value ='->'; }
{kind = TOKEN_IDENTIFIER; ; index = 148 ; length = 6 line = 9 ; column = 20 ; value ='float4'; }
{kind = TOKEN_AT; ; index = 155 ; length = 1 line = 9 ; column = 27 ; value ='@'; }
{kind = TOKEN_IDENTIFIER; ; index = 156 ; length = 7 line = 9 ; column = 28 ; value ='target0'; }
{kind = TOKEN_LEFTBRACE; ; index = 164 ; length = 1 line = 9 ; column = 36 ; value ='{'; }
{kind = TOKEN_RETURN; ; index = 170 ; length = 6 line = 10 ; column = 2 ; value ='return'; }
{kind = TOKEN_IDENTIFIER; ; index = 177 ; length = 5 line = 10 ; column = 9 ; value ='props'; }
{kind = TOKEN_DOT; ; index = 182 ; length = 1 line = 10 ; column = 14 ; value ='.'; }
{kind = TOKEN_IDENTIFIER; ; index = 183 ; length = 5 line = 10 ; column = 15 ; value ='color'; }
{kind = TOKEN_SEMICOLON; ; index = 188 ; length = 1 line = 10 ; column = 20 ; value =';'; }
{kind = TOKEN_RIGHTBRACE; ; index = 191 ; length = 1 line = 11 ; column = 0 ; value ='}'; }
{kind = TOKEN_EOF; ; index = 194 ; length = 0 line = 12 ; column = 0 ; value =''; }

View File

@@ -1,33 +1,33 @@
test/assign_arithmetic_expression.shd lex
test/basic_property_and_return_value.shd lex
test/complicated_computation.shd lex
test/constant_buffer.shd lex
test/empty_struct.shd lex
test/empty_vertex_main.shd lex
test/empty_vertex_main_with_position_parameter.shd lex
test/field_assignment.shd lex
test/field_without_type_specifier.shd lex
test/float_suffix.shd lex
test/function_call.shd lex
test/function_call_out_of_order_declaration.shd lex
test/function_call_return.shd lex
test/functions_with_same_name.shd lex
test/function_with_int_return.shd lex
test/meta_block.shd lex
test/multiple_functions.shd lex
test/multiple_semicolons_everywhere.shd lex
test/pass_and_access_struct_fields_in_functions.shd lex
test/passthrough.shd lex
test/property_rename.shd lex
test/redeclared_variable.shd lex
test/simple_struct_access.shd lex
test/struct_access_primitive_type.shd lex
test/struct_within_struct.shd lex
test/type_as_variable_name.shd lex
test/undeclared_function.shd lex
test/undeclared_symbol.shd lex
test/unknown_overload.shd lex
test/use_builtin_functions.shd lex
test/wrong_argument_count.shd lex
test/wrong_multiply.shd lex
test/wrong_type_for_function.shd lex
test/assign_arithmetic_expression.inx lex
test/basic_property_and_return_value.inx lex
test/complicated_computation.inx lex
test/constant_buffer.inx lex
test/empty_struct.inx lex
test/empty_vertex_main.inx lex
test/empty_vertex_main_with_position_parameter.inx lex
test/field_assignment.inx lex
test/field_without_type_specifier.inx lex
test/float_suffix.inx lex
test/function_call.inx lex
test/function_call_out_of_order_declaration.inx lex
test/function_call_return.inx lex
test/functions_with_same_name.inx lex
test/function_with_int_return.inx lex
test/meta_block.inx lex
test/multiple_functions.inx lex
test/multiple_semicolons_everywhere.inx lex
test/pass_and_access_struct_fields_in_functions.inx lex
test/passthrough.inx lex
test/property_rename.inx lex
test/redeclared_variable.inx lex
test/simple_struct_access.inx lex
test/struct_access_primitive_type.inx lex
test/struct_within_struct.inx lex
test/type_as_variable_name.inx lex
test/undeclared_function.inx lex
test/undeclared_symbol.inx lex
test/unknown_overload.inx lex
test/use_builtin_functions.inx lex
test/wrong_argument_count.inx lex
test/wrong_multiply.inx lex
test/wrong_type_for_function.inx lex

View File

@@ -0,0 +1,14 @@
(program
(constant_buffer camera
[(:= projection float4x4)
(:= view float4x4)])
(fun vertex vs_main -> float4 (@position)
[(:= pos float4 (@position))]
(:= mv float4 (mul camera.view pos))
(:= mvp float4 (mul camera.projection mv))
(return mvp))
(fun pixel ps_main -> float4 (@target)
[]
(return (float4 0.5 0.5 0.5 1))))

View File

@@ -1,4 +1,4 @@
test/field_without_type_specifier.shd:2,0: error: Expected type specifier after field name.
test/field_without_type_specifier.inx:2,0: error: Expected type specifier after field name.
x := 5.0;
^


View File

@@ -0,0 +1,11 @@
(program
(properties props
[(:= color float4)])
(fun vertex vs_main -> float4 (@position)
[(:= pos float4 (@position))]
(return pos))
(fun pixel ps_main -> float4 (@target0)
[]
(return props.color)))

View File

@@ -1,33 +1,33 @@
test/assign_arithmetic_expression.shd parse
test/basic_property_and_return_value.shd parse
test/complicated_computation.shd parse
test/constant_buffer.shd parse
test/empty_struct.shd parse
test/empty_vertex_main.shd parse
test/empty_vertex_main_with_position_parameter.shd parse
test/field_assignment.shd parse
test/field_without_type_specifier.shd parse
test/float_suffix.shd parse
test/function_call.shd parse
test/function_call_out_of_order_declaration.shd parse
test/function_call_return.shd parse
test/functions_with_same_name.shd parse
test/function_with_int_return.shd parse
test/meta_block.shd parse
test/multiple_functions.shd parse
test/multiple_semicolons_everywhere.shd parse
test/pass_and_access_struct_fields_in_functions.shd parse
test/passthrough.shd parse
test/property_rename.shd parse
test/redeclared_variable.shd parse
test/simple_struct_access.shd parse
test/struct_access_primitive_type.shd parse
test/struct_within_struct.shd parse
test/type_as_variable_name.shd parse
test/undeclared_function.shd parse
test/undeclared_symbol.shd parse
test/unknown_overload.shd parse
test/use_builtin_functions.shd parse
test/wrong_argument_count.shd parse
test/wrong_multiply.shd parse
test/wrong_type_for_function.shd parse
test/assign_arithmetic_expression.inx parse
test/basic_property_and_return_value.inx parse
test/complicated_computation.inx parse
test/constant_buffer.inx parse
test/empty_struct.inx parse
test/empty_vertex_main.inx parse
test/empty_vertex_main_with_position_parameter.inx parse
test/field_assignment.inx parse
test/field_without_type_specifier.inx parse
test/float_suffix.inx parse
test/function_call.inx parse
test/function_call_out_of_order_declaration.inx parse
test/function_call_return.inx parse
test/functions_with_same_name.inx parse
test/function_with_int_return.inx parse
test/meta_block.inx parse
test/multiple_functions.inx parse
test/multiple_semicolons_everywhere.inx parse
test/pass_and_access_struct_fields_in_functions.inx parse
test/passthrough.inx parse
test/property_rename.inx parse
test/redeclared_variable.inx parse
test/simple_struct_access.inx parse
test/struct_access_primitive_type.inx parse
test/struct_within_struct.inx parse
test/type_as_variable_name.inx parse
test/undeclared_function.inx parse
test/undeclared_symbol.inx parse
test/unknown_overload.inx parse
test/use_builtin_functions.inx parse
test/wrong_argument_count.inx parse
test/wrong_multiply.inx parse
test/wrong_type_for_function.inx parse

View File

@@ -1,8 +1,8 @@
test/functions_with_same_name.shd:2,0: error: Redeclaration of 'foo'
test/functions_with_same_name.inx:2,0: error: Redeclaration of 'foo'
 foo :: () {
^^^
test/functions_with_same_name.shd:1,0: info: Here is the first declaration of 'foo'
test/functions_with_same_name.inx:1,0: info: Here is the first declaration of 'foo'
 foo :: () {
^^^


View File

@@ -0,0 +1,12 @@
scope (global) [
[pixel__ps_main] : () -> float4
[vertex__vs_main] : (pos : float4) -> float4
[props] : {color : float4}
scope (props) [
[color] : float4
]
scope (vertex__vs_main) [
[pos] : float4
]
scope (pixel__ps_main) []
]

View File

@@ -1,8 +1,8 @@
test/redeclared_variable.shd:3,0: error: Redeclaration of 'x'
test/redeclared_variable.inx:3,0: error: Redeclaration of 'x'
 x : float = 5.0
^
test/redeclared_variable.shd:2,0: info: Here is the first declaration of 'x'
test/redeclared_variable.inx:2,0: info: Here is the first declaration of 'x'
 x : float = 1.0
^


View File

@@ -1,4 +1,4 @@
test/struct_access_primitive_type.shd:3,0: error: Attempting to access a field on a primitive type 'int'.
test/struct_access_primitive_type.inx:3,0: error: Attempting to access a field on a primitive type 'int'.
x.d = 4;
^
declaration:

View File

@@ -1,4 +1,4 @@
test/type_as_variable_name.shd:2,0: error: Invalid variable name 'int'
test/type_as_variable_name.inx:2,0: error: Invalid variable name 'int'
 int : float = 4.0
^^^


View File

@@ -1,4 +1,4 @@
test/undeclared_function.shd:2,0: error: Attempt to call undeclared function 'foo'.
test/undeclared_function.inx:2,0: error: Attempt to call undeclared function 'foo'.
 foo();
^^^

View File

@@ -1,4 +1,4 @@
test/undeclared_symbol.shd:2,10: error: Use of undeclared symbol 'f'
test/undeclared_symbol.inx:2,10: error: Use of undeclared symbol 'f'
 b : int = f;
^


View File

@@ -1,4 +1,4 @@
test/unknown_overload.shd:6,0: error: Procedure call did not match any of the possible overloads for 'foo'
test/unknown_overload.inx:6,0: error: Procedure call did not match any of the possible overloads for 'foo'
 found:
foo(v, v);
^^^
@@ -7,10 +7,10 @@
 foo(v, v);
^
 Possible overloads:
 foo :: (v1 : float3, v2 : float3) { (test/unknown_overload.shd:1)
 foo :: (v1 : float2, v2 : float2, v3 : float2) { (test/unknown_overload.shd:2)
 foo :: (v1 : float3, v2 : float3) { (test/unknown_overload.inx:1)
 foo :: (v1 : float2, v2 : float2, v3 : float2) { (test/unknown_overload.inx:2)
test/unknown_overload.shd:6,4: error: Type mismatch. Expected float3 got float
test/unknown_overload.inx:6,4: error: Type mismatch. Expected float3 got float
 found:
foo(v, v);
^
@@ -20,7 +20,7 @@
got:
v : float = 2.0
test/unknown_overload.shd:6,7: error: Type mismatch. Expected float3 got float
test/unknown_overload.inx:6,7: error: Type mismatch. Expected float3 got float
 found:
foo(v, v);
^

View File

@@ -1,15 +1,15 @@
test/wrong_argument_count.shd:5,19: error: Use of undeclared symbol 'w'
test/wrong_argument_count.inx:5,19: error: Use of undeclared symbol 'w'
 return x * y * z * w;
^
test/wrong_argument_count.shd:9,0: error: Procedure call did not match any of the possible overloads for 'foo'
test/wrong_argument_count.inx:9,0: error: Procedure call did not match any of the possible overloads for 'foo'
 found:
foo(2.0, 3.0);
^^^
 Possible overloads:
 foo :: (x : float, y : float, z : float) -> float { (test/wrong_argument_count.shd:1)
 foo :: (x : float, y : float, z : float) -> float { (test/wrong_argument_count.inx:1)
 Not enough arguments: Wanted 3, got 2.
 foo :: (x : float, y : float, z : float, w : float) -> float { (test/wrong_argument_count.shd:4)
 foo :: (x : float, y : float, z : float, w : float) -> float { (test/wrong_argument_count.inx:4)
 Not enough arguments: Wanted 4, got 2.

View File

@@ -1,4 +1,4 @@
test/wrong_multiply.shd:4,34: error: Type mismatch. Expected float got float2
test/wrong_multiply.inx:4,34: error: Type mismatch. Expected float got float2
 found:
result : float4 = float4(1.0, foo * res, 0.0, 1.0);
^

View File

@@ -1,4 +1,4 @@
test/wrong_type_for_function.shd:11,17: error: Procedure call did not match any of the possible overloads for 'float4'
test/wrong_type_for_function.inx:11,17: error: Procedure call did not match any of the possible overloads for 'float4'
 found:
color : float4 = float4(y, 1.0, 1.0, 1.0);
^^^^^^
@@ -7,9 +7,9 @@
 color : float4 = float4(y, 1.0, 1.0, 1.0);
^
 Possible overloads:
 foreign float4 :: (float, float, float, float) -> float4; (test/wrong_type_for_function.shd:78)
 foreign float4 :: (float, float, float, float) -> float4; (test/wrong_type_for_function.inx:78)
test/wrong_type_for_function.shd:11,24: error: Type mismatch. Expected float got float2
test/wrong_type_for_function.inx:11,24: error: Type mismatch. Expected float got float2
 found:
color : float4 = float4(y, 1.0, 1.0, 1.0);
^

View File

@@ -1,30 +1,30 @@
test/assign_arithmetic_expression.shd semant
test/basic_property_and_return_value.shd semant
test/complicated_computation.shd semant
test/constant_buffer.shd semant
test/empty_struct.shd semant
test/empty_vertex_main.shd semant
test/empty_vertex_main_with_position_parameter.shd semant
test/field_assignment.shd semant
test/function_call.shd semant
test/function_call_out_of_order_declaration.shd semant
test/function_call_return.shd semant
test/functions_with_same_name.shd semant
test/function_with_int_return.shd semant
test/multiple_functions.shd semant
test/multiple_semicolons_everywhere.shd semant
test/pass_and_access_struct_fields_in_functions.shd semant
test/passthrough.shd semant
test/property_rename.shd semant
test/redeclared_variable.shd semant
test/simple_struct_access.shd semant
test/struct_access_primitive_type.shd semant
test/struct_within_struct.shd semant
test/type_as_variable_name.shd semant
test/undeclared_function.shd semant
test/undeclared_symbol.shd semant
test/unknown_overload.shd semant
test/use_builtin_functions.shd semant
test/wrong_argument_count.shd semant
test/wrong_multiply.shd semant
test/wrong_type_for_function.shd semant
test/assign_arithmetic_expression.inx semant
test/basic_property_and_return_value.inx semant
test/complicated_computation.inx semant
test/constant_buffer.inx semant
test/empty_struct.inx semant
test/empty_vertex_main.inx semant
test/empty_vertex_main_with_position_parameter.inx semant
test/field_assignment.inx semant
test/function_call.inx semant
test/function_call_out_of_order_declaration.inx semant
test/function_call_return.inx semant
test/functions_with_same_name.inx semant
test/function_with_int_return.inx semant
test/multiple_functions.inx semant
test/multiple_semicolons_everywhere.inx semant
test/pass_and_access_struct_fields_in_functions.inx semant
test/passthrough.inx semant
test/property_rename.inx semant
test/redeclared_variable.inx semant
test/simple_struct_access.inx semant
test/struct_access_primitive_type.inx semant
test/struct_within_struct.inx semant
test/type_as_variable_name.inx semant
test/undeclared_function.inx semant
test/undeclared_symbol.inx semant
test/unknown_overload.inx semant
test/use_builtin_functions.inx semant
test/wrong_argument_count.inx semant
test/wrong_multiply.inx semant
test/wrong_type_for_function.inx semant

View File

@@ -2,5 +2,5 @@ vertex main :: (pos : float4 @position) -> float4 @position {
res : float2 = float2(2.0, 2.0);
foo : float = 1.0;
result : float4 = float4(1.0, foo * res, 0.0, 1.0);
return float4(1,1,1,1);
return result;
}