mt-lang 0.3.31 → 0.3.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,6 +184,23 @@ module MilkTea
184
184
  !binding.external && binding.type_params.empty?
185
185
  end
186
186
 
187
+ def predeclare_top_level_consts
188
+ @ctx.ast.declarations.each do |decl|
189
+ next unless decl.is_a?(AST::ConstDecl)
190
+
191
+ @ctx.const_declarations[decl.name] ||= decl
192
+ next if @ctx.top_level_values.key?(decl.name)
193
+
194
+ @ctx.top_level_values[decl.name] = value_binding(
195
+ name: decl.name,
196
+ type: @error_type,
197
+ mutable: false,
198
+ kind: :const,
199
+ )
200
+ @predeclared_const_names << decl.name
201
+ end
202
+ end
203
+
187
204
  def finalize_top_level_const_values
188
205
  @ctx.const_declarations.each_key { |name| evaluate_top_level_const_value(name) }
189
206
  end
@@ -247,7 +264,7 @@ module MilkTea
247
264
  kind: binding.kind,
248
265
  const_value: value,
249
266
  )
250
- @evaluated_const_values[name] = true
267
+ @evaluated_const_values[name] = true unless value.nil?
251
268
  end
252
269
 
253
270
  def evaluate_compile_time_block(statements, scopes: nil)
@@ -261,6 +278,10 @@ module MilkTea
261
278
  end
262
279
 
263
280
  def evaluate_compile_time_const_value(expression, scopes: nil)
281
+ if (type_value = evaluate_type_constructor_index_access(expression, scopes:))
282
+ return type_value
283
+ end
284
+
264
285
  CompileTime.evaluate(
265
286
  expression,
266
287
  resolve_identifier: lambda do |identifier_expression|
@@ -324,6 +345,26 @@ module MilkTea
324
345
  raise_sema_error(e.message)
325
346
  end
326
347
 
348
+ def evaluate_type_constructor_index_access(expression, scopes:)
349
+ return nil unless expression.is_a?(AST::IndexAccess)
350
+ return nil unless expression.receiver.is_a?(AST::Identifier)
351
+ return nil unless expression.index.is_a?(AST::Identifier)
352
+ return nil unless %w[ptr const_ptr array span own ref].include?(expression.receiver.name)
353
+
354
+ type_ref = AST::TypeRef.new(
355
+ name: AST::QualifiedName.new(parts: [expression.index.name]),
356
+ arguments: [],
357
+ nullable: false,
358
+ )
359
+ specialization = AST::Specialization.new(
360
+ callee: expression.receiver,
361
+ arguments: [AST::TypeArgument.new(value: type_ref)],
362
+ )
363
+ evaluate_type_returning_call(specialization, scopes:)
364
+ rescue SemanticError
365
+ nil
366
+ end
367
+
327
368
  def evaluate_compile_time_call(expression, scopes: nil)
328
369
  case expression.callee
329
370
  when AST::MemberAccess
@@ -433,7 +474,7 @@ module MilkTea
433
474
  end
434
475
  func = @ctx.top_level_functions[callee_name]
435
476
  if func&.ast&.respond_to?(:const) && func.ast.const
436
- evaluate_const_function_body(func, expression.arguments, scopes:)
477
+ evaluate_const_function_body(func, expression.arguments, scopes:, type_args: expression.callee.arguments)
437
478
  else
438
479
  evaluate_type_returning_call(expression, scopes:)
439
480
  end
@@ -453,7 +494,7 @@ module MilkTea
453
494
  CompileTime::Reflection.core_evaluate_type_returning(
454
495
  callee_name, type_args,
455
496
  evaluate_value: ->(v) { evaluate_compile_time_const_value(v, scopes:) },
456
- resolve_type_ref: ->(tr) { resolve_type_ref(tr) },
497
+ resolve_type_ref: ->(tr) { resolve_named_literal_type_argument(tr) || resolve_type_ref(tr) },
457
498
  pointer_to: ->(t) { pointer_to(t) },
458
499
  const_pointer_to: ->(t) { const_pointer_to(t) },
459
500
  top_level_functions: ->(name) { @ctx.top_level_functions[name] },
@@ -484,7 +525,11 @@ module MilkTea
484
525
  when AST::IntegerLiteral
485
526
  initial_vars[param.name] = arg_value.value
486
527
  when AST::TypeRef
487
- initial_vars[param.name] = resolve_type_ref(arg_value)
528
+ if (literal = resolve_named_literal_type_argument(arg_value))
529
+ initial_vars[param.name] = literal.value
530
+ else
531
+ initial_vars[param.name] = resolve_type_ref(arg_value)
532
+ end
488
533
  else
489
534
  return nil
490
535
  end
@@ -498,10 +543,11 @@ module MilkTea
498
543
  raise_sema_error(e.message)
499
544
  end
500
545
 
501
- def evaluate_const_function_body(func, arguments, scopes:)
546
+ def evaluate_const_function_body(func, arguments, scopes:, type_args: nil)
502
547
  return nil unless func.ast.params.length == arguments.length
503
548
 
504
549
  initial_vars = {}
550
+ bind_const_function_value_type_params(func, type_args, initial_vars)
505
551
  func.ast.params.each_with_index do |param, idx|
506
552
  arg_expr = arguments[idx].value
507
553
  arg_value = if scopes
@@ -528,6 +574,25 @@ module MilkTea
528
574
  raise_sema_error(e.message)
529
575
  end
530
576
 
577
+ def bind_const_function_value_type_params(func, type_args, initial_vars)
578
+ value_params = func.ast.type_params.select { |p| p.is_a?(AST::ValueTypeParam) }
579
+ return if value_params.empty? || type_args.nil?
580
+
581
+ value_params.zip(type_args).each do |param, arg|
582
+ arg_value = arg.value
583
+ case arg_value
584
+ when AST::IntegerLiteral
585
+ initial_vars[param.name] = arg_value.value
586
+ when AST::TypeRef
587
+ if (literal = resolve_named_literal_type_argument(arg_value))
588
+ initial_vars[param.name] = literal.value
589
+ else
590
+ initial_vars[param.name] = resolve_type_ref(arg_value)
591
+ end
592
+ end
593
+ end
594
+ end
595
+
531
596
  def evaluate_has_attribute_call(arguments, scopes:)
532
597
  target = evaluate_reflection_target_argument(arguments.first.value, scopes:)
533
598
  binding = resolve_attribute_name_argument(arguments[1].value)
@@ -726,6 +726,8 @@ module MilkTea
726
726
 
727
727
  def ensure_available_value_name!(name, kind_label: "value", line: nil, column: nil, length: nil)
728
728
  ensure_non_reserved_value_type_name!(name, kind_label:, line:, column:, length:)
729
+ return if @predeclared_const_names.delete?(name)
730
+
729
731
  raise_sema_error("duplicate value #{name}") if @ctx.top_level_values.key?(name) || @ctx.top_level_functions.key?(name)
730
732
  end
731
733
 
@@ -762,6 +764,7 @@ module MilkTea
762
764
  type: type,
763
765
  mutable: false,
764
766
  kind: :const,
767
+ const_value: @ctx.top_level_values[decl.name]&.const_value,
765
768
  )
766
769
  rescue SemanticError => e
767
770
  collect_structural_error(e)
@@ -770,6 +773,7 @@ module MilkTea
770
773
  type: @error_type,
771
774
  mutable: false,
772
775
  kind: :const,
776
+ const_value: @ctx.top_level_values[decl.name]&.const_value,
773
777
  ) unless @ctx.top_level_values.key?(decl.name)
774
778
  end
775
779
  when AST::VarDecl
@@ -175,6 +175,7 @@ module MilkTea
175
175
  @mutable_lvalue_argument_identifier_ids = {}
176
176
  @editable_receiver_expression_ids = {}
177
177
  @preassigned_local_binding_ids = {}
178
+ @predeclared_const_names = Set.new
178
179
  @nullability_flow_result = nil
179
180
  @unsafe_statement_lines = []
180
181
  @callable_value_identifier_sites = {}
@@ -196,6 +197,7 @@ module MilkTea
196
197
  run_phase(:resolve_generic_type_param_constraints, requires: [:declare_named_types])
197
198
  run_phase(:resolve_type_aliases, requires: [:declare_named_types])
198
199
  run_phase(:declare_attributes)
200
+ run_phase(:predeclare_top_level_consts)
199
201
  run_phase(:resolve_aggregate_fields, requires: [:resolve_type_aliases, :declare_named_types])
200
202
  run_phase(:resolve_enum_members, requires: [:declare_named_types])
201
203
  run_phase(:resolve_variant_arms, requires: [:declare_named_types])
@@ -260,12 +262,16 @@ module MilkTea
260
262
  when AST::WhenStmt
261
263
  body = when_chosen_body(stmt) || []
262
264
  body.each { |nested| collect_emit_from_statements([nested]) }
263
- when AST::ForStmt, AST::WhileStmt, AST::IfStmt, AST::MatchStmt
265
+ when AST::ForStmt, AST::WhileStmt
264
266
  next unless stmt.inline
265
267
  stmt.body&.each { |s| collect_emit_from_statements([s]) }
266
- if stmt.is_a?(AST::IfStmt)
267
- stmt.else_body&.each { |s| collect_emit_from_statements([s]) }
268
- end
268
+ when AST::IfStmt
269
+ next unless stmt.inline
270
+ stmt.branches.each { |branch| collect_emit_from_statements(branch.body) }
271
+ stmt.else_body&.each { |s| collect_emit_from_statements([s]) }
272
+ when AST::MatchStmt
273
+ next unless stmt.inline
274
+ stmt.arms.each { |arm| collect_emit_from_statements(arm.body) }
269
275
  end
270
276
  end
271
277
  end
@@ -302,6 +308,7 @@ module MilkTea
302
308
  run_collecting_phase(:resolve_generic_type_param_constraints, requires: [:declare_named_types])
303
309
  run_collecting_phase(:resolve_type_aliases, requires: [:declare_named_types])
304
310
  run_collecting_phase(:declare_attributes)
311
+ run_collecting_phase(:predeclare_top_level_consts)
305
312
  run_collecting_phase(:resolve_aggregate_fields, requires: [:resolve_type_aliases, :declare_named_types])
306
313
  run_collecting_phase(:resolve_enum_members, requires: [:declare_named_types])
307
314
  run_collecting_phase(:resolve_variant_arms, requires: [:declare_named_types])
data/std/c/box2d.mt CHANGED
@@ -424,7 +424,7 @@ enum b2BodyType: int
424
424
  b2_bodyTypeCount = 3
425
425
 
426
426
  struct b2BodyDef:
427
- type_: b2BodyType
427
+ type: b2BodyType
428
428
  position: b2Vec2
429
429
  rotation: b2Rot
430
430
  linearVelocity: b2Vec2
data/std/c/cgltf.mt CHANGED
@@ -44,7 +44,7 @@ struct cgltf_file_options:
44
44
  user_data: ptr[void]
45
45
 
46
46
  struct cgltf_options:
47
- type_: cgltf_file_type
47
+ type: cgltf_file_type
48
48
  json_token_count: ptr_uint
49
49
  memory: cgltf_memory_options
50
50
  file: cgltf_file_options
@@ -186,7 +186,7 @@ struct cgltf_buffer_view:
186
186
  offset: ptr_uint
187
187
  size: ptr_uint
188
188
  stride: ptr_uint
189
- type_: cgltf_buffer_view_type
189
+ type: cgltf_buffer_view_type
190
190
  data: ptr[void]
191
191
  has_meshopt_compression: int
192
192
  meshopt_compression: cgltf_meshopt_compression
@@ -206,7 +206,7 @@ struct cgltf_accessor:
206
206
  name: ptr[char]
207
207
  component_type: cgltf_component_type
208
208
  normalized: int
209
- type_: cgltf_type
209
+ type: cgltf_type
210
210
  offset: ptr_uint
211
211
  count: ptr_uint
212
212
  stride: ptr_uint
@@ -223,7 +223,7 @@ struct cgltf_accessor:
223
223
 
224
224
  struct cgltf_attribute:
225
225
  name: ptr[char]
226
- type_: cgltf_attribute_type
226
+ type: cgltf_attribute_type
227
227
  index: int
228
228
  data: ptr[cgltf_accessor]
229
229
 
@@ -398,7 +398,7 @@ struct cgltf_material:
398
398
  extensions: ptr[cgltf_extension]
399
399
 
400
400
  struct cgltf_material_mapping:
401
- variant_: ptr_uint
401
+ variant: ptr_uint
402
402
  material: ptr[cgltf_material]
403
403
  extras: cgltf_extras
404
404
 
@@ -416,7 +416,7 @@ struct cgltf_mesh_gpu_instancing:
416
416
  attributes_count: ptr_uint
417
417
 
418
418
  struct cgltf_primitive:
419
- type_: cgltf_primitive_type
419
+ type: cgltf_primitive_type
420
420
  indices: ptr[cgltf_accessor]
421
421
  material: ptr[cgltf_material]
422
422
  attributes: ptr[cgltf_attribute]
@@ -471,7 +471,7 @@ struct cgltf_camera_orthographic:
471
471
 
472
472
  struct cgltf_camera:
473
473
  name: ptr[char]
474
- type_: cgltf_camera_type
474
+ type: cgltf_camera_type
475
475
  data: cgltf_camera_data
476
476
  extras: cgltf_extras
477
477
  extensions_count: ptr_uint
@@ -481,7 +481,7 @@ struct cgltf_light:
481
481
  name: ptr[char]
482
482
  color: array[cgltf_float, 3]
483
483
  intensity: float
484
- type_: cgltf_light_type
484
+ type: cgltf_light_type
485
485
  range: float
486
486
  spot_inner_cone_angle: float
487
487
  spot_outer_cone_angle: float
data/std/c/cjson.mt CHANGED
@@ -8,7 +8,7 @@ struct cJSON:
8
8
  next: ptr[cJSON]
9
9
  prev: ptr[cJSON]
10
10
  child: ptr[cJSON]
11
- type_: int
11
+ type: int
12
12
  valuestring: ptr[char]
13
13
  valueint: int
14
14
  valuedouble: double
data/std/c/curl.mt CHANGED
@@ -29,7 +29,7 @@ struct curl_header = c"struct curl_header":
29
29
 
30
30
  struct curl_ws_frame = c"struct curl_ws_frame":
31
31
  age: int
32
- flags_: int
32
+ flags: int
33
33
  offset: ptr_int
34
34
  bytesleft: ptr_int
35
35
  len: ptr_uint
@@ -69,7 +69,7 @@ struct curl_httppost = c"struct curl_httppost":
69
69
  contenttype: ptr[char]
70
70
  contentheader: ptr[curl_slist]
71
71
  more: ptr[curl_httppost]
72
- flags_: ptr_int
72
+ flags: ptr_int
73
73
  showfilename: ptr[char]
74
74
  userp: ptr[void]
75
75
  contentlen: ptr_int
@@ -100,7 +100,7 @@ struct curl_fileinfo = c"struct curl_fileinfo":
100
100
  size: ptr_int
101
101
  hardlinks: ptr_int
102
102
  strings: curl_fileinfo_strings
103
- flags_: uint
103
+ flags: uint
104
104
  b_data: ptr[char]
105
105
  b_size: ptr_uint
106
106
  b_used: ptr_uint
@@ -1069,8 +1069,8 @@ external function curl_url_strerror(error: int) -> cstr
1069
1069
  struct curl_easyoption = c"struct curl_easyoption":
1070
1070
  name: cstr
1071
1071
  id: CURLoption
1072
- type_: int
1073
- flags_: uint
1072
+ type: int
1073
+ flags: uint
1074
1074
 
1075
1075
  external function curl_easy_option_by_name(name: cstr) -> const_ptr[curl_easyoption]
1076
1076
  external function curl_easy_option_by_id(id: CURLoption) -> const_ptr[curl_easyoption]
data/std/c/enet.mt CHANGED
@@ -213,7 +213,7 @@ type ENetPacketFreeCallback = fn(arg0: ptr[ENetPacket]) -> void
213
213
 
214
214
  struct ENetPacket:
215
215
  referenceCount: ptr_uint
216
- flags_: uint
216
+ flags: uint
217
217
  data: ptr[enet_uint8]
218
218
  dataLength: ptr_uint
219
219
  freeCallback: fn(arg0: ptr[ENetPacket]) -> void
@@ -327,7 +327,7 @@ struct ENetPeer:
327
327
  outgoingSendReliableCommands: ENetList
328
328
  outgoingCommands: ENetList
329
329
  dispatchedCommands: ENetList
330
- flags_: ushort
330
+ flags: ushort
331
331
  reserved: ushort
332
332
  incomingUnsequencedGroup: ushort
333
333
  outgoingUnsequencedGroup: ushort
@@ -389,7 +389,7 @@ enum ENetEventType: int
389
389
  ENET_EVENT_TYPE_RECEIVE = 3
390
390
 
391
391
  struct ENetEvent:
392
- type_: ENetEventType
392
+ type: ENetEventType
393
393
  peer: ptr[ENetPeer]
394
394
  channelID: ubyte
395
395
  data: uint
data/std/c/flecs.mt CHANGED
@@ -106,7 +106,7 @@ struct ecs_world_stats_t_http:
106
106
  union ecs_meta_op_t_is:
107
107
  members: ptr[ecs_hashmap_t]
108
108
  constants: ptr[ecs_map_t]
109
- opaque_: fn(arg0: const_ptr[ecs_serializer_t], arg1: const_ptr[void]) -> int
109
+ opaque: fn(arg0: const_ptr[ecs_serializer_t], arg1: const_ptr[void]) -> int
110
110
 
111
111
  opaque ecs_event_id_record_t = c"struct ecs_event_id_record_t"
112
112
  opaque ecs_query_var_t = c"struct ecs_query_var_t"
@@ -136,7 +136,7 @@ type ecs_poly_t = void
136
136
  opaque ecs_mixins_t = c"ecs_mixins_t"
137
137
 
138
138
  struct ecs_header_t:
139
- type_: int
139
+ type: int
140
140
  refcount: int
141
141
  mixins: ptr[ecs_mixins_t]
142
142
 
@@ -486,7 +486,7 @@ struct ecs_term_t:
486
486
  first: ecs_term_ref_t
487
487
  second: ecs_term_ref_t
488
488
  trav: ptr_uint
489
- inout_: short
489
+ inout: short
490
490
  oper: short
491
491
  field_index: byte
492
492
  flags_: ushort
@@ -497,7 +497,7 @@ struct ecs_query_t:
497
497
  sizes: ptr[int]
498
498
  ids: ptr[ecs_id_t]
499
499
  bloom_filter: ptr_uint
500
- flags_: uint
500
+ flags: uint
501
501
  var_count: byte
502
502
  term_count: byte
503
503
  field_count: byte
@@ -547,7 +547,7 @@ struct ecs_type_hooks_t:
547
547
  move_dtor: fn(arg0: ptr[void], arg1: ptr[void], arg2: int, arg3: const_ptr[ecs_type_info_t]) -> void
548
548
  cmp: fn(arg0: const_ptr[void], arg1: const_ptr[void], arg2: const_ptr[ecs_type_info_t]) -> int
549
549
  equals: fn(arg0: const_ptr[void], arg1: const_ptr[void], arg2: const_ptr[ecs_type_info_t]) -> bool
550
- flags_: uint
550
+ flags: uint
551
551
  on_add: fn(arg0: ptr[ecs_iter_t]) -> void
552
552
  on_set: fn(arg0: ptr[ecs_iter_t]) -> void
553
553
  on_remove: fn(arg0: ptr[ecs_iter_t]) -> void
@@ -575,7 +575,7 @@ struct ecs_event_record_t:
575
575
  wildcard: ptr[ecs_event_id_record_t]
576
576
  wildcard_pair: ptr[ecs_event_id_record_t]
577
577
  event_ids: ecs_map_t
578
- event_: ptr_uint
578
+ event: ptr_uint
579
579
 
580
580
  struct ecs_observable_t:
581
581
  on_add: ecs_event_record_t
@@ -720,7 +720,7 @@ struct ecs_table_records_t:
720
720
  count: int
721
721
 
722
722
  struct ecs_value_t:
723
- type_: ptr_uint
723
+ type: ptr_uint
724
724
  ptr: ptr[void]
725
725
 
726
726
  struct ecs_entity_desc_t:
@@ -747,7 +747,7 @@ struct ecs_bulk_desc_t:
747
747
  struct ecs_component_desc_t:
748
748
  _canary: int
749
749
  entity: ptr_uint
750
- type_: ecs_type_info_t
750
+ type: ecs_type_info_t
751
751
 
752
752
  struct ecs_iter_t:
753
753
  world: ptr[ecs_world_t]
@@ -769,7 +769,7 @@ struct ecs_iter_t:
769
769
  row_fields: uint
770
770
  up_fields: uint
771
771
  system: ptr_uint
772
- event_: ptr_uint
772
+ event: ptr_uint
773
773
  event_id: ptr_uint
774
774
  event_cur: int
775
775
  field_count: byte
@@ -783,7 +783,7 @@ struct ecs_iter_t:
783
783
  delta_time: float
784
784
  delta_system_time: float
785
785
  frame_offset: int
786
- flags_: uint
786
+ flags: uint
787
787
  interrupted_by: ptr_uint
788
788
  priv_: ecs_iter_private_t
789
789
  next: fn(arg0: ptr[ecs_iter_t]) -> bool
@@ -796,7 +796,7 @@ struct ecs_query_desc_t:
796
796
  terms: array[ecs_term_t, 32]
797
797
  expr: cstr
798
798
  cache_kind: ecs_query_cache_kind_t
799
- flags_: uint
799
+ flags: uint
800
800
  order_by_callback: fn(arg0: ecs_entity_t, arg1: const_ptr[void], arg2: ecs_entity_t, arg3: const_ptr[void]) -> int
801
801
  order_by_table_callback: fn(arg0: ptr[ecs_world_t], arg1: ptr[ecs_table_t], arg2: ptr[ecs_entity_t], arg3: ptr[void], arg4: int, arg5: int, arg6: int, arg7: ecs_order_by_action_t) -> void
802
802
  order_by: ptr_uint
@@ -832,7 +832,7 @@ struct ecs_observer_desc_t:
832
832
  flags_: uint
833
833
 
834
834
  struct ecs_event_desc_t:
835
- event_: ptr_uint
835
+ event: ptr_uint
836
836
  ids: const_ptr[ecs_type_t]
837
837
  table: ptr[ecs_table_t]
838
838
  other_table: ptr[ecs_table_t]
@@ -842,12 +842,12 @@ struct ecs_event_desc_t:
842
842
  param: ptr[void]
843
843
  const_param: const_ptr[void]
844
844
  observable: ptr[ecs_poly_t]
845
- flags_: uint
845
+ flags: uint
846
846
 
847
847
  struct ecs_build_info_t:
848
848
  compiler: cstr
849
849
  addons: ptr[cstr]
850
- flags_: ptr[cstr]
850
+ flags: ptr[cstr]
851
851
  version: cstr
852
852
  version_major: short
853
853
  version_minor: short
@@ -1690,7 +1690,7 @@ struct EcsAlertsActive:
1690
1690
  struct ecs_alert_severity_filter_t:
1691
1691
  severity: ptr_uint
1692
1692
  with: ptr_uint
1693
- var_: cstr
1693
+ var: cstr
1694
1694
  _var_index: int
1695
1695
 
1696
1696
  struct ecs_alert_desc_t:
@@ -1705,7 +1705,7 @@ struct ecs_alert_desc_t:
1705
1705
  retain_period: float
1706
1706
  member: ptr_uint
1707
1707
  id: ptr_uint
1708
- var_: cstr
1708
+ var: cstr
1709
1709
 
1710
1710
  external function ecs_alert_init(world: ptr[ecs_world_t], desc: const_ptr[ecs_alert_desc_t]) -> ecs_entity_t
1711
1711
  external function ecs_get_alert_count(world: const_ptr[ecs_world_t], entity: ptr_uint, alert: ptr_uint) -> int
@@ -1812,7 +1812,7 @@ struct EcsScript:
1812
1812
 
1813
1813
  struct ecs_function_ctx_t:
1814
1814
  world: ptr[ecs_world_t]
1815
- function_: ptr_uint
1815
+ function: ptr_uint
1816
1816
  ctx: ptr[void]
1817
1817
 
1818
1818
  type ecs_function_callback_t = fn(arg0: const_ptr[ecs_function_ctx_t], arg1: int, arg2: const_ptr[ecs_value_t], arg3: ptr[ecs_value_t]) -> void
@@ -1820,7 +1820,7 @@ type ecs_vector_function_callback_t = fn(arg0: const_ptr[ecs_function_ctx_t], ar
1820
1820
 
1821
1821
  struct ecs_script_parameter_t:
1822
1822
  name: cstr
1823
- type_: ptr_uint
1823
+ type: ptr_uint
1824
1824
 
1825
1825
  struct EcsScriptConstVar:
1826
1826
  value: ecs_value_t
@@ -1880,7 +1880,7 @@ struct ecs_expr_eval_desc_t:
1880
1880
  name: cstr
1881
1881
  expr: cstr
1882
1882
  vars: const_ptr[ecs_script_vars_t]
1883
- type_: ptr_uint
1883
+ type: ptr_uint
1884
1884
  lookup_action: fn(arg0: const_ptr[ecs_world_t], arg1: cstr, arg2: ptr[void]) -> ecs_entity_t
1885
1885
  lookup_ctx: ptr[void]
1886
1886
  disable_folding: bool
@@ -1898,7 +1898,7 @@ external function ecs_script_string_interpolate(world: ptr[ecs_world_t], str_: c
1898
1898
  struct ecs_const_var_desc_t:
1899
1899
  name: cstr
1900
1900
  parent: ptr_uint
1901
- type_: ptr_uint
1901
+ type: ptr_uint
1902
1902
  value: ptr[void]
1903
1903
 
1904
1904
  external function ecs_const_var_init(world: ptr[ecs_world_t], desc: ptr[ecs_const_var_desc_t]) -> ecs_entity_t
@@ -1999,7 +1999,7 @@ struct EcsPrimitive:
1999
1999
  kind: ecs_primitive_kind_t
2000
2000
 
2001
2001
  struct EcsMember:
2002
- type_: ptr_uint
2002
+ type: ptr_uint
2003
2003
  count: int
2004
2004
  unit: ptr_uint
2005
2005
  offset: int
@@ -2016,7 +2016,7 @@ struct EcsMemberRanges:
2016
2016
 
2017
2017
  struct ecs_member_t:
2018
2018
  name: cstr
2019
- type_: ptr_uint
2019
+ type: ptr_uint
2020
2020
  count: int
2021
2021
  offset: int
2022
2022
  unit: ptr_uint
@@ -2053,11 +2053,11 @@ struct EcsConstants:
2053
2053
  ordered_constants: ecs_vec_t
2054
2054
 
2055
2055
  struct EcsArray:
2056
- type_: ptr_uint
2056
+ type: ptr_uint
2057
2057
  count: int
2058
2058
 
2059
2059
  struct EcsVector:
2060
- type_: ptr_uint
2060
+ type: ptr_uint
2061
2061
 
2062
2062
  struct ecs_serializer_t:
2063
2063
  value: fn(arg0: const_ptr[ecs_serializer_t], arg1: ecs_entity_t, arg2: const_ptr[void]) -> int
@@ -2146,22 +2146,22 @@ struct ecs_meta_op_t:
2146
2146
  elem_size: int
2147
2147
  op_count: short
2148
2148
  member_index: short
2149
- type_: ptr_uint
2149
+ type: ptr_uint
2150
2150
  type_info: const_ptr[ecs_type_info_t]
2151
- is_: ecs_meta_op_t_is
2151
+ is: ecs_meta_op_t_is
2152
2152
 
2153
2153
  struct EcsTypeSerializer:
2154
2154
  kind: ecs_type_kind_t
2155
2155
  ops: ecs_vec_t
2156
2156
 
2157
2157
  struct ecs_meta_scope_t:
2158
- type_: ptr_uint
2158
+ type: ptr_uint
2159
2159
  ops: ptr[ecs_meta_op_t]
2160
2160
  ops_count: short
2161
2161
  ops_cur: short
2162
2162
  prev_depth: short
2163
2163
  ptr: ptr[void]
2164
- opaque_: const_ptr[EcsOpaque]
2164
+ opaque: const_ptr[EcsOpaque]
2165
2165
  members: ptr[ecs_hashmap_t]
2166
2166
  is_collection: bool
2167
2167
  is_empty_scope: bool
@@ -2237,14 +2237,14 @@ external function ecs_bitmask_init(world: ptr[ecs_world_t], desc: const_ptr[ecs_
2237
2237
 
2238
2238
  struct ecs_array_desc_t:
2239
2239
  entity: ptr_uint
2240
- type_: ptr_uint
2240
+ type: ptr_uint
2241
2241
  count: int
2242
2242
 
2243
2243
  external function ecs_array_init(world: ptr[ecs_world_t], desc: const_ptr[ecs_array_desc_t]) -> ecs_entity_t
2244
2244
 
2245
2245
  struct ecs_vector_desc_t:
2246
2246
  entity: ptr_uint
2247
- type_: ptr_uint
2247
+ type: ptr_uint
2248
2248
 
2249
2249
  external function ecs_vector_init(world: ptr[ecs_world_t], desc: const_ptr[ecs_vector_desc_t]) -> ecs_entity_t
2250
2250
 
@@ -2260,7 +2260,7 @@ external function ecs_struct_get_nth_member(world: ptr[ecs_world_t], type_: ptr_
2260
2260
 
2261
2261
  struct ecs_opaque_desc_t:
2262
2262
  entity: ptr_uint
2263
- type_: EcsOpaque
2263
+ type: EcsOpaque
2264
2264
 
2265
2265
  external function ecs_opaque_init(world: ptr[ecs_world_t], desc: const_ptr[ecs_opaque_desc_t]) -> ecs_entity_t
2266
2266