redscript-mc 2.5.0 → 2.6.2
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.
- package/CHANGELOG.md +80 -0
- package/README.md +5 -75
- package/README.zh.md +165 -147
- package/ROADMAP.md +195 -0
- package/dist/data/linalg/function/_vec2d_len_sq_fx.mcfunction +17 -0
- package/dist/data/linalg/function/_vec3d_len_sq_fx.mcfunction +27 -0
- package/dist/data/linalg/function/load.mcfunction +1 -0
- package/dist/data/linalg/function/mat2d_det.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r0c0.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r0c1.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r1c0.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r1c1.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_vecmul_x.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_vecmul_y.mcfunction +16 -0
- package/dist/data/linalg/function/solve2d_x.mcfunction +27 -0
- package/dist/data/linalg/function/solve2d_y.mcfunction +27 -0
- package/dist/data/linalg/function/vec2d_dist.mcfunction +15 -0
- package/dist/data/linalg/function/vec2d_dot.mcfunction +16 -0
- package/dist/data/linalg/function/vec2d_length.mcfunction +21 -0
- package/dist/data/linalg/function/vec2d_normalize_x.mcfunction +8 -0
- package/dist/data/linalg/function/vec2d_normalize_x__merge_1.mcfunction +10 -0
- package/dist/data/linalg/function/vec2d_normalize_x__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec2d_normalize_y.mcfunction +8 -0
- package/dist/data/linalg/function/vec2d_normalize_y__merge_1.mcfunction +10 -0
- package/dist/data/linalg/function/vec2d_normalize_y__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_cross_x.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_cross_y.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_cross_z.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_dist.mcfunction +21 -0
- package/dist/data/linalg/function/vec3d_dot.mcfunction +26 -0
- package/dist/data/linalg/function/vec3d_length.mcfunction +31 -0
- package/dist/data/linalg/function/vec3d_normalize_x.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_x__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_x__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_normalize_y.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_y__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_y__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_normalize_z.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_z__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_z__then_0.mcfunction +3 -0
- package/dist/data/math_hp/function/cos_hp.mcfunction +8 -0
- package/dist/data/math_hp/function/div3_hp.mcfunction +23 -0
- package/dist/data/math_hp/function/div_hp.mcfunction +13 -0
- package/dist/data/math_hp/function/init_div.mcfunction +1 -0
- package/dist/data/math_hp/function/init_trig.mcfunction +1 -0
- package/dist/data/math_hp/function/ln_5term.mcfunction +6 -0
- package/dist/data/math_hp/function/ln_5term__loop_body_1.mcfunction +8 -0
- package/dist/data/math_hp/function/ln_5term__loop_body_4.mcfunction +8 -0
- package/dist/data/math_hp/function/ln_5term__loop_exit_2.mcfunction +1 -0
- package/dist/data/math_hp/function/ln_5term__loop_exit_5.mcfunction +61 -0
- package/dist/data/math_hp/function/ln_5term__loop_header_0.mcfunction +3 -0
- package/dist/data/math_hp/function/ln_5term__loop_header_3.mcfunction +6 -0
- package/dist/data/math_hp/function/load.mcfunction +1 -0
- package/dist/data/math_hp/function/norm3_hp.mcfunction +43 -0
- package/dist/data/math_hp/function/sin_hp.mcfunction +8 -0
- package/dist/data/math_hp/function/sqrt_hp.mcfunction +17 -0
- package/dist/data/math_hp/function/sqrt_hp__merge_1.mcfunction +21 -0
- package/dist/data/math_hp/function/sqrt_hp__then_0.mcfunction +2 -0
- package/dist/data/minecraft/tags/function/load.json +1 -2
- package/dist/data/minecraft/tags/function/tick.json +1 -1
- package/dist/data/readme_demo/function/_draw.mcfunction +1 -0
- package/dist/data/readme_demo/function/_init.mcfunction +1 -0
- package/dist/data/readme_demo/function/_math_init.mcfunction +4 -0
- package/dist/data/readme_demo/function/_wave_tick.mcfunction +1 -0
- package/dist/data/readme_demo/function/_wave_tick__foreach_t8.mcfunction +109 -0
- package/dist/data/readme_demo/function/acos_approx.mcfunction +7 -0
- package/dist/data/readme_demo/function/approx_eq.mcfunction +10 -0
- package/dist/data/readme_demo/function/approx_eq__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/approx_eq__merge_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/approx_eq__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/approx_eq__then_2.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx.mcfunction +5 -0
- package/dist/data/readme_demo/function/asin_approx__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/asin_approx__merge_10.mcfunction +5 -0
- package/dist/data/readme_demo/function/asin_approx__merge_4.mcfunction +12 -0
- package/dist/data/readme_demo/function/asin_approx__merge_7.mcfunction +14 -0
- package/dist/data/readme_demo/function/asin_approx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_6.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_9.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_body_6.mcfunction +7 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_exit_7.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_header_5.mcfunction +4 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_11.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_13.mcfunction +4 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_4.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_9.mcfunction +13 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_10.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_12.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_8.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_newton__else_7.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_1.mcfunction +11 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_4.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_3.mcfunction +17 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_5.mcfunction +11 -0
- package/dist/data/readme_demo/function/ceil_div.mcfunction +9 -0
- package/dist/data/readme_demo/function/combinations.mcfunction +6 -0
- package/dist/data/readme_demo/function/combinations__loop_body_9.mcfunction +15 -0
- package/dist/data/readme_demo/function/combinations__loop_exit_10.mcfunction +1 -0
- package/dist/data/readme_demo/function/combinations__loop_header_8.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__merge_4.mcfunction +6 -0
- package/dist/data/readme_demo/function/combinations__merge_7.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/combinations__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/combinations__then_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/cos_fixed.mcfunction +7 -0
- package/dist/data/readme_demo/function/cubic_disc_fx.mcfunction +26 -0
- package/dist/data/readme_demo/function/cubic_newton.mcfunction +8 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_body_1.mcfunction +55 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_exit_2.mcfunction +1 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_header_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_10.mcfunction +1 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_8.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/cubic_newton__then_5.mcfunction +13 -0
- package/dist/data/readme_demo/function/cubic_newton__then_7.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__then_9.mcfunction +2 -0
- package/dist/data/readme_demo/function/divfix.mcfunction +6 -0
- package/dist/data/readme_demo/function/divfix__merge_1.mcfunction +6 -0
- package/dist/data/readme_demo/function/divfix__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/exp_fx.mcfunction +16 -0
- package/dist/data/readme_demo/function/exp_fx__loop_body_10.mcfunction +8 -0
- package/dist/data/readme_demo/function/exp_fx__loop_body_5.mcfunction +8 -0
- package/dist/data/readme_demo/function/exp_fx__loop_exit_11.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__loop_exit_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__loop_header_4.mcfunction +3 -0
- package/dist/data/readme_demo/function/exp_fx__loop_header_9.mcfunction +3 -0
- package/dist/data/readme_demo/function/exp_fx__merge_1.mcfunction +47 -0
- package/dist/data/readme_demo/function/exp_fx__merge_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/exp_fx__merge_8.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__then_0.mcfunction +7 -0
- package/dist/data/readme_demo/function/exp_fx__then_2.mcfunction +2 -0
- package/dist/data/readme_demo/function/exp_fx__then_7.mcfunction +5 -0
- package/dist/data/readme_demo/function/factorial.mcfunction +5 -0
- package/dist/data/readme_demo/function/factorial__loop_body_4.mcfunction +7 -0
- package/dist/data/readme_demo/function/factorial__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/factorial__loop_header_3.mcfunction +3 -0
- package/dist/data/readme_demo/function/factorial__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/factorial__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/gamma_int.mcfunction +5 -0
- package/dist/data/readme_demo/function/gamma_int__merge_1.mcfunction +6 -0
- package/dist/data/readme_demo/function/gamma_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/gcd.mcfunction +7 -0
- package/dist/data/readme_demo/function/gcd__loop_body_5.mcfunction +5 -0
- package/dist/data/readme_demo/function/gcd__loop_exit_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/gcd__loop_header_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/gcd__merge_1.mcfunction +5 -0
- package/dist/data/readme_demo/function/gcd__merge_3.mcfunction +1 -0
- package/dist/data/readme_demo/function/gcd__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/gcd__then_2.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt.mcfunction +5 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_10.mcfunction +8 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_13.mcfunction +11 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_7.mcfunction +8 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_11.mcfunction +2 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_14.mcfunction +1 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_8.mcfunction +9 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_12.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_9.mcfunction +3 -0
- package/dist/data/readme_demo/function/isqrt__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__merge_16.mcfunction +5 -0
- package/dist/data/readme_demo/function/isqrt__merge_4.mcfunction +3 -0
- package/dist/data/readme_demo/function/isqrt__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/isqrt__then_15.mcfunction +1 -0
- package/dist/data/readme_demo/function/isqrt__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/lcm.mcfunction +11 -0
- package/dist/data/readme_demo/function/lcm__merge_1.mcfunction +5 -0
- package/dist/data/readme_demo/function/lcm__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/lerp.mcfunction +13 -0
- package/dist/data/readme_demo/function/ln.mcfunction +9 -0
- package/dist/data/readme_demo/function/ln__loop_body_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/ln__loop_body_4.mcfunction +8 -0
- package/dist/data/readme_demo/function/ln__loop_exit_2.mcfunction +1 -0
- package/dist/data/readme_demo/function/ln__loop_exit_5.mcfunction +37 -0
- package/dist/data/readme_demo/function/ln__loop_header_0.mcfunction +3 -0
- package/dist/data/readme_demo/function/ln__loop_header_3.mcfunction +6 -0
- package/dist/data/readme_demo/function/load.mcfunction +1 -0
- package/dist/data/readme_demo/function/log10_fx.mcfunction +11 -0
- package/dist/data/readme_demo/function/log2_fx.mcfunction +11 -0
- package/dist/data/readme_demo/function/log2_int.mcfunction +5 -0
- package/dist/data/readme_demo/function/log2_int__loop_body_4.mcfunction +8 -0
- package/dist/data/readme_demo/function/log2_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/log2_int__loop_header_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/log2_int__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/log2_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/loga_fx.mcfunction +10 -0
- package/dist/data/readme_demo/function/loga_fx__merge_1.mcfunction +9 -0
- package/dist/data/readme_demo/function/loga_fx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/map.mcfunction +12 -0
- package/dist/data/readme_demo/function/map__merge_1.mcfunction +11 -0
- package/dist/data/readme_demo/function/map__then_0.mcfunction +1 -0
- package/dist/data/readme_demo/function/mulfix.mcfunction +8 -0
- package/dist/data/readme_demo/function/newton_step.mcfunction +7 -0
- package/dist/data/readme_demo/function/newton_step__merge_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/newton_step__then_0.mcfunction +1 -0
- package/dist/data/readme_demo/function/pow_int.mcfunction +6 -0
- package/dist/data/readme_demo/function/pow_int__loop_body_4.mcfunction +7 -0
- package/dist/data/readme_demo/function/pow_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/pow_int__loop_header_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/pow_int__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/pow_int__merge_7.mcfunction +8 -0
- package/dist/data/readme_demo/function/pow_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/pow_int__then_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/quadratic_disc.mcfunction +12 -0
- package/dist/data/readme_demo/function/quadratic_x1.mcfunction +7 -0
- package/dist/data/readme_demo/function/quadratic_x1__merge_1.mcfunction +13 -0
- package/dist/data/readme_demo/function/quadratic_x1__merge_4.mcfunction +15 -0
- package/dist/data/readme_demo/function/quadratic_x1__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x1__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x2.mcfunction +7 -0
- package/dist/data/readme_demo/function/quadratic_x2__merge_1.mcfunction +13 -0
- package/dist/data/readme_demo/function/quadratic_x2__merge_4.mcfunction +15 -0
- package/dist/data/readme_demo/function/quadratic_x2__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x2__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign.mcfunction +5 -0
- package/dist/data/readme_demo/function/sign__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/sign__merge_4.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/simpson_step.mcfunction +16 -0
- package/dist/data/readme_demo/function/sin_fixed.mcfunction +9 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_9.mcfunction +10 -0
- package/dist/data/readme_demo/function/sin_fixed__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__then_2.mcfunction +6 -0
- package/dist/data/readme_demo/function/sin_fixed__then_5.mcfunction +8 -0
- package/dist/data/readme_demo/function/sin_fixed__then_8.mcfunction +10 -0
- package/dist/data/readme_demo/function/smootherstep.mcfunction +10 -0
- package/dist/data/readme_demo/function/smootherstep__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/smootherstep__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/smootherstep__merge_6.mcfunction +27 -0
- package/dist/data/readme_demo/function/smootherstep__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/smootherstep__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/smootherstep__then_5.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep.mcfunction +10 -0
- package/dist/data/readme_demo/function/smoothstep__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/smoothstep__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/smoothstep__merge_6.mcfunction +15 -0
- package/dist/data/readme_demo/function/smoothstep__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep__then_5.mcfunction +2 -0
- package/dist/data/readme_demo/function/solve2x2_x.mcfunction +17 -0
- package/dist/data/readme_demo/function/solve2x2_x__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/solve2x2_x__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/solve2x2_y.mcfunction +17 -0
- package/dist/data/readme_demo/function/solve2x2_y__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/solve2x2_y__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/sqrt_fixed.mcfunction +8 -0
- package/dist/data/readme_demo/function/sqrt_fx.mcfunction +8 -0
- package/dist/data/readme_demo/function/start.mcfunction +2 -0
- package/dist/data/readme_demo/function/stop.mcfunction +1 -0
- package/dist/data/readme_demo/function/trapezoid_step.mcfunction +11 -0
- package/dist/data/stdextra/function/__load.mcfunction +2 -0
- package/dist/data/stdextra/function/load.mcfunction +1 -0
- package/dist/data/stdextra/function/test_bigint.mcfunction +52 -0
- package/dist/data/stdextra/function/test_bits.mcfunction +33 -0
- package/dist/data/stdextra/function/test_list_sort.mcfunction +55 -0
- package/dist/data/stdextra/function/test_random.mcfunction +17 -0
- package/dist/data/stdextra/function/test_random__merge_1.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__merge_11.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__merge_3.mcfunction +14 -0
- package/dist/data/stdextra/function/test_random__merge_5.mcfunction +8 -0
- package/dist/data/stdextra/function/test_random__merge_7.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__merge_9.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__then_0.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__then_10.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_2.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_4.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__then_6.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_8.mcfunction +4 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_nums.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_parent.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_queue.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_rev.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_visited.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_parent.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_visited.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1.mcfunction +17 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_header_0_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__else_8.mcfunction +19 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_body_4.mcfunction +9 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_header_3_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_10.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_12.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_14.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_16.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_18.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_20.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_22.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_24.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_11.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_13.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_15.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_17.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_19.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_21.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_23.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_6.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_9.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__else_32.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_body_28.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_header_27.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_header_27_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__then_30.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34.mcfunction +16 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_header_33.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_header_33_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_5.mcfunction +16 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_5__merge_26.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_1.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_2.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_3.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_4.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_5.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_2.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_3.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_4.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_5.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__done.mcfunction +1 -0
- package/dist/data/test/function/_hsl_chroma_x.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_1.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_10.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_13.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_4.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_7.mcfunction +1 -2
- package/dist/data/test/function/acos_approx.mcfunction +7 -0
- package/dist/data/test/function/add_to_team.mcfunction +5 -0
- package/dist/data/test/function/angle_diff.mcfunction +1 -2
- package/dist/data/test/function/angle_normalize__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/angle_normalize__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/angry_at.mcfunction +1 -0
- package/dist/data/test/function/apply_damage.mcfunction +12 -0
- package/dist/data/test/function/apply_damage__else_2.mcfunction +2 -0
- package/dist/data/test/function/apply_damage__merge_1.mcfunction +1 -0
- package/dist/data/test/function/apply_damage__then_0.mcfunction +2 -0
- package/dist/data/test/function/arr_test.mcfunction +4 -0
- package/dist/data/test/function/asin_approx.mcfunction +5 -0
- package/dist/data/test/function/asin_approx__merge_1.mcfunction +3 -0
- package/dist/data/test/function/asin_approx__merge_10.mcfunction +5 -0
- package/dist/data/test/function/asin_approx__merge_4.mcfunction +12 -0
- package/dist/data/test/function/asin_approx__merge_7.mcfunction +14 -0
- package/dist/data/test/function/asin_approx__then_0.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_3.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_6.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_9.mcfunction +2 -0
- package/dist/data/test/function/barrier_wall.mcfunction +1 -0
- package/dist/data/test/function/bernoulli.mcfunction +1 -2
- package/dist/data/test/function/bernoulli__merge_1.mcfunction +1 -2
- package/dist/data/test/function/bigint_chunk.mcfunction +2 -0
- package/dist/data/test/function/bigint_div_small.mcfunction +6 -0
- package/dist/data/test/function/bigint_div_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_div_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_div_small__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_mod_small.mcfunction +6 -0
- package/dist/data/test/function/bigint_mod_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_mod_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_mod_small__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bit_and__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_and__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_and__then_3.mcfunction +1 -2
- package/dist/data/test/function/bit_clear__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_clear__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_get__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_not__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_not__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_or__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_or__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_or__merge_4.mcfunction +1 -2
- package/dist/data/test/function/bit_or__then_5.mcfunction +1 -2
- package/dist/data/test/function/bit_set__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_set__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_shl__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_shr__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_toggle__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_toggle__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_xor__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_xor__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/buff_all.mcfunction +22 -0
- package/dist/data/test/function/cbrt_newton.mcfunction +5 -0
- package/dist/data/test/function/cbrt_newton__else_7.mcfunction +2 -0
- package/dist/data/test/function/cbrt_newton__merge_1.mcfunction +11 -0
- package/dist/data/test/function/cbrt_newton__merge_4.mcfunction +1 -0
- package/dist/data/test/function/cbrt_newton__merge_6.mcfunction +1 -0
- package/dist/data/test/function/cbrt_newton__then_0.mcfunction +2 -0
- package/dist/data/test/function/cbrt_newton__then_3.mcfunction +17 -0
- package/dist/data/test/function/cbrt_newton__then_5.mcfunction +11 -0
- package/dist/data/test/function/check_holding_item.mcfunction +1 -0
- package/dist/data/test/function/check_look_down.mcfunction +1 -0
- package/dist/data/test/function/check_look_down__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/check_look_straight.mcfunction +1 -0
- package/dist/data/test/function/check_look_straight__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/check_look_up.mcfunction +1 -0
- package/dist/data/test/function/check_look_up__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/cleanup_teams.mcfunction +8 -0
- package/dist/data/test/function/clear_area.mcfunction +1 -0
- package/dist/data/test/function/clear_effect.mcfunction +1 -0
- package/dist/data/test/function/clear_effects.mcfunction +1 -0
- package/dist/data/test/function/clear_inventory.mcfunction +1 -0
- package/dist/data/test/function/cooldown_ready.mcfunction +7 -0
- package/dist/data/test/function/cooldown_ready__merge_1.mcfunction +4 -0
- package/dist/data/test/function/cooldown_ready__merge_4.mcfunction +2 -0
- package/dist/data/test/function/cooldown_ready__then_0.mcfunction +2 -0
- package/dist/data/test/function/cooldown_ready__then_3.mcfunction +2 -0
- package/dist/data/test/function/cooldown_start.mcfunction +3 -0
- package/dist/data/test/function/cooldown_tick.mcfunction +7 -0
- package/dist/data/test/function/cooldown_tick__else_5.mcfunction +2 -0
- package/dist/data/test/function/cooldown_tick__merge_1.mcfunction +4 -0
- package/dist/data/test/function/cooldown_tick__merge_4.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__merge_7.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__then_0.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__then_3.mcfunction +7 -0
- package/dist/data/test/function/cooldown_tick__then_6.mcfunction +2 -0
- package/dist/data/test/function/cos_hp.mcfunction +4 -2
- package/dist/data/test/function/create_blue_team.mcfunction +10 -0
- package/dist/data/test/function/create_green_team.mcfunction +10 -0
- package/dist/data/test/function/create_health_bar.mcfunction +24 -0
- package/dist/data/test/function/create_progress_bar.mcfunction +24 -0
- package/dist/data/test/function/create_red_team.mcfunction +10 -0
- package/dist/data/test/function/create_team.mcfunction +8 -0
- package/dist/data/test/function/create_timer_bar.mcfunction +30 -0
- package/dist/data/test/function/create_yellow_team.mcfunction +10 -0
- package/dist/data/test/function/cubic_disc_fx.mcfunction +26 -0
- package/dist/data/test/function/cubic_newton.mcfunction +8 -0
- package/dist/data/test/function/cubic_newton__loop_body_1.mcfunction +55 -0
- package/dist/data/test/function/cubic_newton__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/cubic_newton__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_10.mcfunction +1 -0
- package/dist/data/test/function/cubic_newton__merge_4.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_6.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_8.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__then_3.mcfunction +2 -0
- package/dist/data/test/function/cubic_newton__then_5.mcfunction +13 -0
- package/dist/data/test/function/cubic_newton__then_7.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__then_9.mcfunction +2 -0
- package/dist/data/test/function/curve_length_2d.mcfunction +6 -0
- package/dist/data/test/function/curve_length_2d__loop_body_1.mcfunction +32 -0
- package/dist/data/test/function/curve_length_2d__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/curve_length_2d__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/cylinder_contains.mcfunction +1 -2
- package/dist/data/test/function/damage.mcfunction +9 -0
- package/dist/data/test/function/damage__else_2.mcfunction +2 -0
- package/dist/data/test/function/damage__merge_1.mcfunction +1 -0
- package/dist/data/test/function/damage__then_0.mcfunction +2 -0
- package/dist/data/test/function/deriv_central.mcfunction +7 -0
- package/dist/data/test/function/deriv_central__merge_1.mcfunction +10 -0
- package/dist/data/test/function/deriv_central__then_0.mcfunction +2 -0
- package/dist/data/test/function/deriv_forward.mcfunction +7 -0
- package/dist/data/test/function/deriv_forward__merge_1.mcfunction +8 -0
- package/dist/data/test/function/deriv_forward__then_0.mcfunction +2 -0
- package/dist/data/test/function/disable_fire_spread.mcfunction +1 -0
- package/dist/data/test/function/disable_keep_inventory.mcfunction +1 -0
- package/dist/data/test/function/disable_mob_griefing.mcfunction +1 -0
- package/dist/data/test/function/div3_hp.mcfunction +23 -0
- package/dist/data/test/function/div_hp.mcfunction +13 -0
- package/dist/data/test/function/draw_circle.mcfunction +8 -0
- package/dist/data/test/function/draw_circle__loop_body_1.mcfunction +34 -0
- package/dist/data/test/function/draw_circle__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_circle__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/draw_helix.mcfunction +10 -0
- package/dist/data/test/function/draw_helix__loop_body_1.mcfunction +42 -0
- package/dist/data/test/function/draw_helix__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_helix__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/draw_line_2d.mcfunction +9 -0
- package/dist/data/test/function/draw_line_2d__loop_body_1.mcfunction +34 -0
- package/dist/data/test/function/draw_line_2d__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_line_2d__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/ease_in_expo.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_back.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_bounce.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_cubic.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_quad.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_sine.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce__merge_1.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce__merge_4.mcfunction +1 -2
- package/dist/data/test/function/ease_out_expo.mcfunction +1 -2
- package/dist/data/test/function/enable_keep_inventory.mcfunction +1 -0
- package/dist/data/test/function/end_sparkles_at.mcfunction +1 -0
- package/dist/data/test/function/enemy_health.mcfunction +2 -0
- package/dist/data/test/function/example_right_click.mcfunction +1 -0
- package/dist/data/test/function/example_right_click__foreach_t0.mcfunction +5 -0
- package/dist/data/test/function/example_right_click__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/example_right_click__foreach_t0__then_0.mcfunction +3 -0
- package/dist/data/test/function/exp_dist_approx.mcfunction +1 -2
- package/dist/data/test/function/exp_dist_approx__merge_1.mcfunction +1 -2
- package/dist/data/test/function/exp_dist_approx__merge_3.mcfunction +1 -2
- package/dist/data/test/function/explosion_effect.mcfunction +1 -0
- package/dist/data/test/function/fbm_1d__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/fbm_1d__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/fbm_2d__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/fbm_2d__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/flames.mcfunction +1 -0
- package/dist/data/test/function/gather_all.mcfunction +8 -0
- package/dist/data/test/function/give_kit_archer.mcfunction +6 -0
- package/dist/data/test/function/give_kit_mage.mcfunction +5 -0
- package/dist/data/test/function/give_kit_warrior.mcfunction +6 -0
- package/dist/data/test/function/glass_box.mcfunction +2 -0
- package/dist/data/test/function/glow.mcfunction +1 -0
- package/dist/data/test/function/goto_arena.mcfunction +7 -0
- package/dist/data/test/function/goto_lobby.mcfunction +7 -0
- package/dist/data/test/function/happy_at.mcfunction +1 -0
- package/dist/data/test/function/hash_1d_pos.mcfunction +1 -2
- package/dist/data/test/function/hash_2d_pos.mcfunction +1 -2
- package/dist/data/test/function/heal.mcfunction +5 -0
- package/dist/data/test/function/heap_new.mcfunction +7 -0
- package/dist/data/test/function/heap_new__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/heap_new__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_new__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_peek.mcfunction +2 -0
- package/dist/data/test/function/heap_pop.mcfunction +4 -0
- package/dist/data/test/function/heap_pop__else_13.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__loop_body_1.mcfunction +14 -0
- package/dist/data/test/function/heap_pop__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_pop__merge_10.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_12.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_4.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__merge_6.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_8.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_11.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__then_3.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_5.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__then_7.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_9.mcfunction +2 -0
- package/dist/data/test/function/heap_push.mcfunction +6 -0
- package/dist/data/test/function/heap_push__else_5.mcfunction +2 -0
- package/dist/data/test/function/heap_push__else_8.mcfunction +2 -0
- package/dist/data/test/function/heap_push__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/heap_push__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_push__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_push__merge_4.mcfunction +1 -0
- package/dist/data/test/function/heap_push__merge_7.mcfunction +1 -0
- package/dist/data/test/function/heap_push__then_3.mcfunction +7 -0
- package/dist/data/test/function/heap_push__then_6.mcfunction +2 -0
- package/dist/data/test/function/heap_size.mcfunction +2 -0
- package/dist/data/test/function/hearts_at.mcfunction +1 -0
- package/dist/data/test/function/hide_bar.mcfunction +4 -0
- package/dist/data/test/function/hsl_to_b.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_9.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_9.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_9.mcfunction +1 -2
- package/dist/data/test/function/init_div.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__else_11.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort__else_8.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort__loop_body_1.mcfunction +6 -0
- package/dist/data/test/function/insertion_sort__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__loop_exit_5.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__merge_10.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__merge_7.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__then_6.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort__then_9.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__else_11.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort_desc__else_8.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort_desc__loop_body_1.mcfunction +6 -0
- package/dist/data/test/function/insertion_sort_desc__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__loop_exit_5.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort_desc__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__merge_10.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__merge_7.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__then_6.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort_desc__then_9.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__loop_body_6.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__loop_exit_7.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__loop_header_5.mcfunction +5 -0
- package/dist/data/test/function/integrate_simpson__merge_1.mcfunction +8 -0
- package/dist/data/test/function/integrate_simpson__merge_11.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson__merge_4.mcfunction +5 -0
- package/dist/data/test/function/integrate_simpson__merge_9.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__then_0.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__then_10.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__then_3.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson__then_8.mcfunction +6 -0
- package/dist/data/test/function/integrate_trapezoid.mcfunction +7 -0
- package/dist/data/test/function/integrate_trapezoid__loop_body_4.mcfunction +7 -0
- package/dist/data/test/function/integrate_trapezoid__loop_exit_5.mcfunction +6 -0
- package/dist/data/test/function/integrate_trapezoid__loop_header_3.mcfunction +5 -0
- package/dist/data/test/function/integrate_trapezoid__merge_1.mcfunction +11 -0
- package/dist/data/test/function/integrate_trapezoid__then_0.mcfunction +2 -0
- package/dist/data/test/function/interactions_init.mcfunction +9 -0
- package/dist/data/test/function/invisible.mcfunction +1 -0
- package/dist/data/test/function/is_op.mcfunction +2 -0
- package/dist/data/test/function/is_op__exec_t1.mcfunction +1 -0
- package/dist/data/test/function/is_sneaking.mcfunction +5 -0
- package/dist/data/test/function/is_sneaking__merge_1.mcfunction +2 -0
- package/dist/data/test/function/is_sneaking__then_0.mcfunction +2 -0
- package/dist/data/test/function/jump.mcfunction +1 -0
- package/dist/data/test/function/launch_up.mcfunction +6 -0
- package/dist/data/test/function/list_max3.mcfunction +1 -2
- package/dist/data/test/function/list_max3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_max5.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/list_min3.mcfunction +1 -2
- package/dist/data/test/function/list_min3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_min5.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/max_heap_pop.mcfunction +4 -0
- package/dist/data/test/function/max_heap_pop__else_13.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__loop_body_1.mcfunction +14 -0
- package/dist/data/test/function/max_heap_pop__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/max_heap_pop__merge_10.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_12.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_4.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__merge_6.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_8.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_11.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__then_3.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_5.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__then_7.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_9.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push.mcfunction +6 -0
- package/dist/data/test/function/max_heap_push__else_5.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push__else_8.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/max_heap_push__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/max_heap_push__merge_4.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__merge_7.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__then_3.mcfunction +7 -0
- package/dist/data/test/function/max_heap_push__then_6.mcfunction +2 -0
- package/dist/data/test/function/newton_step.mcfunction +7 -0
- package/dist/data/test/function/newton_step__merge_1.mcfunction +8 -0
- package/dist/data/test/function/newton_step__then_0.mcfunction +1 -0
- package/dist/data/test/function/night_vision.mcfunction +1 -0
- package/dist/data/test/function/norm3_hp.mcfunction +43 -0
- package/dist/data/test/function/normal_approx12.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_1.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_11.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_13.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_15.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_17.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_19.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_21.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_3.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_5.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_7.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_9.mcfunction +1 -2
- package/dist/data/test/function/on_double_sneak.mcfunction +1 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0.mcfunction +9 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__merge_3.mcfunction +2 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__then_0.mcfunction +6 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__then_2.mcfunction +2 -0
- package/dist/data/test/function/on_right_click.mcfunction +1 -0
- package/dist/data/test/function/on_right_click__foreach_t1.mcfunction +5 -0
- package/dist/data/test/function/on_right_click__foreach_t1__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_right_click__foreach_t1__then_0.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_click.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0.mcfunction +7 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__else_4.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__merge_3.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__then_0.mcfunction +4 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__then_2.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_start.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0.mcfunction +5 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__else_2.mcfunction +2 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__then_0.mcfunction +2 -0
- package/dist/data/test/function/particle_at_fx.mcfunction +1 -0
- package/dist/data/test/function/particle_dot.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__else_33.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__else_8.mcfunction +19 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_1.mcfunction +10 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_29.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_35.mcfunction +9 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_4.mcfunction +9 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_2.mcfunction +24 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_30.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_36.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_5.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_28.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_34.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__merge_10.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_12.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_14.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_16.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_18.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_20.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_22.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_24.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_26.mcfunction +5 -0
- package/dist/data/test/function/pathfind_bfs__merge_32.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_7.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__then_11.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_13.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_15.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_17.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_19.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_21.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_23.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_25.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__then_31.mcfunction +2 -0
- package/dist/data/test/function/pathfind_bfs__then_6.mcfunction +3 -0
- package/dist/data/test/function/pathfind_bfs__then_9.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs_coro.mcfunction +1 -0
- package/dist/data/test/function/pcg_output.mcfunction +1 -2
- package/dist/data/test/function/pf_heuristic.mcfunction +14 -0
- package/dist/data/test/function/pf_heuristic__merge_1.mcfunction +4 -0
- package/dist/data/test/function/pf_heuristic__merge_3.mcfunction +6 -0
- package/dist/data/test/function/pf_heuristic__then_0.mcfunction +4 -0
- package/dist/data/test/function/pf_heuristic__then_2.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked.mcfunction +7 -0
- package/dist/data/test/function/pf_is_blocked__merge_1.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_10.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_4.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_7.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__then_0.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_3.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_6.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_9.mcfunction +2 -0
- package/dist/data/test/function/pf_new_map.mcfunction +4 -0
- package/dist/data/test/function/pf_new_map__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/pf_new_map__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/pf_new_map__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/pf_noop.mcfunction +1 -0
- package/dist/data/test/function/pf_pack.mcfunction +8 -0
- package/dist/data/test/function/pf_set_blocked.mcfunction +5 -0
- package/dist/data/test/function/pf_set_open.mcfunction +5 -0
- package/dist/data/test/function/pf_unpack_x.mcfunction +5 -0
- package/dist/data/test/function/pf_unpack_z.mcfunction +5 -0
- package/dist/data/test/function/popcount__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/popcount__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/portal_effect.mcfunction +1 -0
- package/dist/data/test/function/random_bool.mcfunction +1 -2
- package/dist/data/test/function/random_range.mcfunction +1 -2
- package/dist/data/test/function/regen.mcfunction +1 -0
- package/dist/data/test/function/remove_bar.mcfunction +3 -0
- package/dist/data/test/function/remove_from_teams.mcfunction +3 -0
- package/dist/data/test/function/remove_item.mcfunction +1 -0
- package/dist/data/test/function/resistance.mcfunction +1 -0
- package/dist/data/test/function/rgb_to_h.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_12.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_7.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_9.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__then_11.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_7.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_9.mcfunction +1 -2
- package/dist/data/test/function/riemann_left.mcfunction +6 -0
- package/dist/data/test/function/riemann_left__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_left__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_left__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/riemann_mid.mcfunction +6 -0
- package/dist/data/test/function/riemann_mid__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_mid__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_mid__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/riemann_right.mcfunction +6 -0
- package/dist/data/test/function/riemann_right__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_right__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_right__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/running_m2.mcfunction +16 -0
- package/dist/data/test/function/running_mean.mcfunction +7 -0
- package/dist/data/test/function/running_mean__merge_1.mcfunction +13 -0
- package/dist/data/test/function/running_mean__then_0.mcfunction +1 -0
- package/dist/data/test/function/second_deriv.mcfunction +8 -0
- package/dist/data/test/function/second_deriv__merge_1.mcfunction +14 -0
- package/dist/data/test/function/second_deriv__then_0.mcfunction +2 -0
- package/dist/data/test/function/set_day.mcfunction +1 -0
- package/dist/data/test/function/set_easy.mcfunction +1 -0
- package/dist/data/test/function/set_hard.mcfunction +1 -0
- package/dist/data/test/function/set_midnight.mcfunction +1 -0
- package/dist/data/test/function/set_night.mcfunction +1 -0
- package/dist/data/test/function/set_noon.mcfunction +1 -0
- package/dist/data/test/function/set_normal.mcfunction +1 -0
- package/dist/data/test/function/set_peaceful.mcfunction +1 -0
- package/dist/data/test/function/setup_four_teams.mcfunction +4 -0
- package/dist/data/test/function/setup_two_teams.mcfunction +2 -0
- package/dist/data/test/function/show_bar.mcfunction +4 -0
- package/dist/data/test/function/simpson_step.mcfunction +16 -0
- package/dist/data/test/function/sin_hp.mcfunction +4 -2
- package/dist/data/test/function/slow_fall.mcfunction +1 -0
- package/dist/data/test/function/smoke.mcfunction +1 -0
- package/dist/data/test/function/sort2_max.mcfunction +1 -2
- package/dist/data/test/function/sort2_min.mcfunction +1 -2
- package/dist/data/test/function/sort3.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort4.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_11.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_14.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_9.mcfunction +1 -2
- package/dist/data/test/function/sort5.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_11.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_13.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_15.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_17.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_19.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_22.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_25.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_9.mcfunction +1 -2
- package/dist/data/test/function/sort_merge.mcfunction +10 -0
- package/dist/data/test/function/sort_merge__else_11.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__else_14.mcfunction +2 -0
- package/dist/data/test/function/sort_merge__else_5.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__else_8.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__loop_body_1.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/sort_merge__merge_10.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_13.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_4.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_7.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__then_12.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__then_3.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__then_6.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__then_9.mcfunction +7 -0
- package/dist/data/test/function/sparkles_at.mcfunction +1 -0
- package/dist/data/test/function/speed.mcfunction +1 -0
- package/dist/data/test/function/sphere_contains.mcfunction +1 -2
- package/dist/data/test/function/spread_players.mcfunction +1 -0
- package/dist/data/test/function/sqrt_fx.mcfunction +5 -8
- package/dist/data/test/function/sqrt_hp.mcfunction +17 -0
- package/dist/data/test/function/sqrt_hp__merge_1.mcfunction +21 -0
- package/dist/data/test/function/sqrt_hp__then_0.mcfunction +2 -0
- package/dist/data/test/function/std_dev_approx.mcfunction +5 -0
- package/dist/data/test/function/std_dev_approx__merge_1.mcfunction +13 -0
- package/dist/data/test/function/std_dev_approx__then_0.mcfunction +2 -0
- package/dist/data/test/function/str_len.mcfunction +2 -0
- package/dist/data/test/function/strength.mcfunction +1 -0
- package/dist/data/test/function/t.mcfunction +3 -0
- package/dist/data/test/function/teleport_to.mcfunction +9 -0
- package/dist/data/test/function/teleport_to_entity.mcfunction +5 -0
- package/dist/data/test/function/test.mcfunction +5 -0
- package/dist/data/test/function/test__loop_body_1.mcfunction +9 -0
- package/dist/data/test/function/test__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/test__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/tile_of.mcfunction +1 -2
- package/dist/data/test/function/timer/done.mcfunction +1 -2
- package/dist/data/test/function/timer/remaining.mcfunction +1 -2
- package/dist/data/test/function/timer/tick.mcfunction +1 -2
- package/dist/data/test/function/timer/tick__then_0.mcfunction +1 -2
- package/dist/data/test/function/totem_at.mcfunction +1 -0
- package/dist/data/test/function/trapezoid_step.mcfunction +11 -0
- package/dist/data/test/function/uniform_frac.mcfunction +1 -2
- package/dist/data/test/function/uniform_int.mcfunction +1 -2
- package/dist/data/test/function/update_bar.mcfunction +5 -0
- package/dist/data/test/function/update_bar_color.mcfunction +6 -0
- package/dist/data/test/function/update_bar_color__else_2.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__else_5.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__merge_1.mcfunction +1 -0
- package/dist/data/test/function/update_bar_color__merge_4.mcfunction +1 -0
- package/dist/data/test/function/update_bar_color__then_0.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__then_3.mcfunction +4 -0
- package/dist/data/test/function/value_noise_1d.mcfunction +1 -2
- package/dist/data/test/function/value_noise_2d.mcfunction +1 -2
- package/dist/data/test/function/value_noise_2d__merge_1.mcfunction +1 -2
- package/dist/data/test/function/variance_from_m2.mcfunction +6 -0
- package/dist/data/test/function/variance_from_m2__merge_1.mcfunction +5 -0
- package/dist/data/test/function/variance_from_m2__then_0.mcfunction +2 -0
- package/dist/data/test/function/weapon_damage.mcfunction +5 -0
- package/dist/data/test/function/weather_clear.mcfunction +1 -0
- package/dist/data/test/function/weather_rain.mcfunction +1 -0
- package/dist/data/test/function/weather_thunder.mcfunction +1 -0
- package/dist/data/test/function/weighted2.mcfunction +1 -2
- package/dist/data/test/function/weighted2__merge_1.mcfunction +1 -2
- package/dist/data/test/function/weighted3.mcfunction +1 -2
- package/dist/data/test/function/weighted3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/weighted3__merge_3.mcfunction +1 -2
- package/dist/data/test_dmul/function/__double_mul_macro.mcfunction +1 -0
- package/dist/data/test_dmul/function/double_mul_fixed.mcfunction +6 -0
- package/dist/data/test_dmul/function/load.mcfunction +1 -0
- package/dist/data/test_double_fn/function/double_test.mcfunction +2 -0
- package/dist/data/test_double_fn/function/load.mcfunction +1 -0
- package/dist/data/test_double_fn2/function/double_test.mcfunction +2 -0
- package/dist/data/test_double_fn2/function/load.mcfunction +1 -0
- package/dist/data/test_double_pass/function/caller_fn.mcfunction +4 -0
- package/dist/data/test_double_pass/function/consume_double.mcfunction +2 -0
- package/dist/data/test_double_pass/function/load.mcfunction +1 -0
- package/dist/data/test_macro/function/load.mcfunction +1 -0
- package/dist/data/test_macro/function/macro_helper.mcfunction +1 -0
- package/dist/data/test_macro3/function/__dmul_macro.mcfunction +1 -0
- package/dist/data/test_macro3/function/double_mul_test.mcfunction +7 -0
- package/dist/data/test_macro3/function/load.mcfunction +1 -0
- package/dist/data/test_ret_double/function/load.mcfunction +1 -0
- package/dist/data/test_ret_double/function/make_double.mcfunction +3 -0
- package/dist/data/test_ret_double/function/use_it.mcfunction +3 -0
- package/dist/pack.mcmeta +1 -1
- package/dist/src/__tests__/array-dynamic.test.js +42 -0
- package/dist/src/__tests__/builtins.test.d.ts +1 -0
- package/dist/src/__tests__/builtins.test.js +55 -0
- package/dist/src/__tests__/compile-all.test.js +1 -0
- package/dist/src/__tests__/diagnostics.test.js +8 -11
- package/dist/src/__tests__/double.test.d.ts +7 -0
- package/dist/src/__tests__/double.test.js +464 -0
- package/dist/src/__tests__/e2e/ecs-stdlib.test.d.ts +7 -0
- package/dist/src/__tests__/e2e/ecs-stdlib.test.js +328 -0
- package/dist/src/__tests__/e2e/events-stdlib.test.d.ts +1 -0
- package/dist/src/__tests__/e2e/events-stdlib.test.js +81 -0
- package/dist/src/__tests__/e2e/fft-stdlib.test.d.ts +13 -0
- package/dist/src/__tests__/e2e/fft-stdlib.test.js +288 -0
- package/dist/src/__tests__/e2e/for-in-array.test.d.ts +4 -0
- package/dist/src/__tests__/e2e/for-in-array.test.js +59 -0
- package/dist/src/__tests__/e2e/macros.test.js +7 -7
- package/dist/src/__tests__/e2e/ode-stdlib.test.d.ts +1 -0
- package/dist/src/__tests__/e2e/ode-stdlib.test.js +91 -0
- package/dist/src/__tests__/e2e/stdlib-e2e.test.js +1616 -0
- package/dist/src/__tests__/emit/compile.test.d.ts +1 -0
- package/dist/src/__tests__/emit/compile.test.js +95 -0
- package/dist/src/__tests__/emit/index.test.d.ts +1 -0
- package/dist/src/__tests__/emit/index.test.js +180 -0
- package/dist/src/__tests__/emit/modules-extra.test.d.ts +1 -0
- package/dist/src/__tests__/emit/modules-extra.test.js +77 -0
- package/dist/src/__tests__/enum.test.js +4 -6
- package/dist/src/__tests__/fixed.test.d.ts +7 -0
- package/dist/src/__tests__/fixed.test.js +148 -0
- package/dist/src/__tests__/float-lint.test.d.ts +7 -0
- package/dist/src/__tests__/float-lint.test.js +96 -0
- package/dist/src/__tests__/float.test.d.ts +7 -0
- package/dist/src/__tests__/float.test.js +148 -0
- package/dist/src/__tests__/for-each.test.d.ts +1 -0
- package/dist/src/__tests__/for-each.test.js +125 -0
- package/dist/src/__tests__/for-range.test.d.ts +1 -0
- package/dist/src/__tests__/for-range.test.js +136 -0
- package/dist/src/__tests__/generics.test.js +4 -4
- package/dist/src/__tests__/impl.test.d.ts +1 -0
- package/dist/src/__tests__/impl.test.js +199 -0
- package/dist/src/__tests__/lsp-logic.test.d.ts +1 -0
- package/dist/src/__tests__/lsp-logic.test.js +145 -0
- package/dist/src/__tests__/match.test.d.ts +10 -0
- package/dist/src/__tests__/match.test.js +197 -0
- package/dist/src/__tests__/mc-integration/item-entity-events.test.d.ts +18 -0
- package/dist/src/__tests__/mc-integration/item-entity-events.test.js +287 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage-2.test.d.ts +13 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage-2.test.js +833 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage.test.d.ts +13 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage.test.js +707 -0
- package/dist/src/__tests__/mc-integration/syntax-coverage.test.d.ts +9 -0
- package/dist/src/__tests__/mc-integration/syntax-coverage.test.js +442 -0
- package/dist/src/__tests__/mc-integration.test.js +835 -5
- package/dist/src/__tests__/optimizer/constant_fold.test.js +105 -0
- package/dist/src/__tests__/optimizer/coroutine.test.js +3 -2
- package/dist/src/__tests__/parser.test.js +5 -5
- package/dist/src/__tests__/runtime.test.js +143 -238
- package/dist/src/__tests__/stdlib/arr-len.test.d.ts +13 -0
- package/dist/src/__tests__/stdlib/arr-len.test.js +195 -0
- package/dist/src/__tests__/stdlib/calculus.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/calculus.test.js +123 -0
- package/dist/src/__tests__/stdlib/dialog.test.d.ts +6 -0
- package/dist/src/__tests__/stdlib/dialog.test.js +142 -0
- package/dist/src/__tests__/stdlib/easing.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/easing.test.js +117 -0
- package/dist/src/__tests__/stdlib/geometry.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/geometry.test.js +163 -0
- package/dist/src/__tests__/stdlib/heap.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/heap.test.js +141 -0
- package/dist/src/__tests__/stdlib/list.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/list.test.js +134 -0
- package/dist/src/__tests__/stdlib/matrix.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/matrix.test.js +148 -0
- package/dist/src/__tests__/stdlib/pathfind.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/pathfind.test.js +167 -0
- package/dist/src/__tests__/stdlib/scheduler.test.d.ts +6 -0
- package/dist/src/__tests__/stdlib/scheduler.test.js +177 -0
- package/dist/src/__tests__/stdlib/sort-v2.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/sort-v2.test.js +131 -0
- package/dist/src/__tests__/stdlib/sort.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/sort.test.js +128 -0
- package/dist/src/__tests__/stdlib/state.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/state.test.js +176 -0
- package/dist/src/__tests__/typechecker-strict.test.js +21 -21
- package/dist/src/__tests__/typechecker.test.js +5 -3
- package/dist/src/ast/types.d.ts +28 -2
- package/dist/src/emit/compile.js +30 -3
- package/dist/src/emit/index.d.ts +2 -0
- package/dist/src/emit/index.js +20 -1
- package/dist/src/emit/modules.js +3 -2
- package/dist/src/events/types.d.ts +1 -1
- package/dist/src/events/types.js +5 -2
- package/dist/src/hir/lower.js +88 -2
- package/dist/src/hir/monomorphize.js +11 -5
- package/dist/src/hir/types.d.ts +20 -1
- package/dist/src/lexer/index.d.ts +1 -1
- package/dist/src/lexer/index.js +10 -1
- package/dist/src/lir/lower.js +7 -0
- package/dist/src/lsp/server.js +912 -56
- package/dist/src/mc-test/client.d.ts +13 -1
- package/dist/src/mc-test/client.js +29 -1
- package/dist/src/mir/lower.js +703 -74
- package/dist/src/mir/types.d.ts +5 -0
- package/dist/src/mir/verify.js +2 -0
- package/dist/src/optimizer/constant_fold.js +10 -6
- package/dist/src/optimizer/coroutine.js +90 -33
- package/dist/src/optimizer/interprocedural.js +4 -0
- package/dist/src/parser/index.d.ts +5 -0
- package/dist/src/parser/index.js +171 -39
- package/dist/src/runtime/index.js +24 -0
- package/dist/src/typechecker/index.d.ts +8 -1
- package/dist/src/typechecker/index.js +73 -14
- package/docs/LANGUAGE_REFERENCE.md +302 -67
- package/docs/stdlib/README.md +54 -0
- package/docs/stdlib/advanced.md +276 -0
- package/docs/stdlib/bigint.md +285 -0
- package/docs/stdlib/bits.md +159 -0
- package/docs/stdlib/bossbar.md +101 -0
- package/docs/stdlib/calculus.md +141 -0
- package/docs/stdlib/color.md +125 -0
- package/docs/stdlib/combat.md +41 -0
- package/docs/stdlib/cooldown.md +48 -0
- package/docs/stdlib/easing.md +157 -0
- package/docs/stdlib/effects.md +101 -0
- package/docs/stdlib/expr.md +38 -0
- package/docs/stdlib/geometry.md +130 -0
- package/docs/stdlib/interactions.md +111 -0
- package/docs/stdlib/inventory.md +53 -0
- package/docs/stdlib/list.md +189 -0
- package/docs/stdlib/math.md +334 -0
- package/docs/stdlib/math_hp.md +185 -0
- package/docs/stdlib/matrix.md +123 -0
- package/docs/stdlib/mobs.md +131 -0
- package/docs/stdlib/noise.md +103 -0
- package/docs/stdlib/parabola.md +119 -0
- package/docs/stdlib/particles.md +123 -0
- package/docs/stdlib/physics.md +148 -0
- package/docs/stdlib/player.md +43 -0
- package/docs/stdlib/quaternion.md +159 -0
- package/docs/stdlib/random.md +86 -0
- package/docs/stdlib/sets.md +68 -0
- package/docs/stdlib/signal.md +141 -0
- package/docs/stdlib/spawn.md +65 -0
- package/docs/stdlib/strings.md +17 -0
- package/docs/stdlib/tags.md +117 -0
- package/docs/stdlib/teams.md +87 -0
- package/docs/stdlib/timer.md +126 -0
- package/docs/stdlib/vec.md +193 -0
- package/docs/stdlib/world.md +151 -0
- package/editors/vscode/build.mjs +31 -12
- package/editors/vscode/out/extension.js +3670 -200
- package/editors/vscode/out/lsp-server.js +14854 -0
- package/editors/vscode/package-lock.json +3 -3
- package/editors/vscode/package.json +1 -1
- package/editors/vscode/snippets/redscript.json +109 -30
- package/editors/vscode/src/extension.ts +15 -13
- package/examples/readme-demo.mcrs +4 -4
- package/jest.config.js +5 -2
- package/package.json +1 -1
- package/scripts/postbuild.js +20 -0
- package/src/__tests__/array-dynamic.test.ts +42 -0
- package/src/__tests__/builtins.test.ts +66 -0
- package/src/__tests__/compile-all.test.ts +3 -2
- package/src/__tests__/diagnostics.test.ts +8 -10
- package/src/__tests__/double.test.ts +478 -0
- package/src/__tests__/e2e/ecs-stdlib.test.ts +371 -0
- package/src/__tests__/e2e/events-stdlib.test.ts +50 -0
- package/src/__tests__/e2e/fft-stdlib.test.ts +313 -0
- package/src/__tests__/e2e/macros.test.ts +7 -7
- package/src/__tests__/e2e/ode-stdlib.test.ts +68 -0
- package/src/__tests__/e2e/stdlib-e2e.test.ts +1952 -0
- package/src/__tests__/emit/compile.test.ts +102 -0
- package/src/__tests__/emit/index.test.ts +189 -0
- package/src/__tests__/emit/modules-extra.test.ts +80 -0
- package/src/__tests__/enum.test.ts +4 -6
- package/src/__tests__/fixed.test.ts +159 -0
- package/src/__tests__/fixtures/coroutine-mc-test.mcrs +58 -0
- package/src/__tests__/fixtures/for-range.mcrs +15 -0
- package/src/__tests__/fixtures/heap-sort-mc-test.mcrs +87 -0
- package/src/__tests__/fixtures/impl-test.mcrs +13 -44
- package/src/__tests__/fixtures/stdlib-extra-test.mcrs +226 -0
- package/src/__tests__/fixtures/stdlib-math-integration.mcrs +28 -0
- package/src/__tests__/fixtures/stdlib-math-test.mcrs +53 -0
- package/src/__tests__/float-lint.test.ts +102 -0
- package/src/__tests__/float.test.ts +158 -0
- package/src/__tests__/for-each.test.ts +135 -0
- package/src/__tests__/for-range.test.ts +149 -0
- package/src/__tests__/generics.test.ts +4 -4
- package/src/__tests__/impl.test.ts +207 -0
- package/src/__tests__/lsp-logic.test.ts +162 -0
- package/src/__tests__/match.test.ts +212 -0
- package/src/__tests__/mc-integration/item-entity-events.test.ts +298 -0
- package/src/__tests__/mc-integration/stdlib-coverage-2.test.ts +817 -0
- package/src/__tests__/mc-integration/stdlib-coverage.test.ts +699 -0
- package/src/__tests__/mc-integration/syntax-coverage.test.ts +464 -0
- package/src/__tests__/mc-integration.test.ts +889 -5
- package/src/__tests__/optimizer/constant_fold.test.ts +115 -0
- package/src/__tests__/optimizer/coroutine.test.ts +3 -2
- package/src/__tests__/parser.test.ts +5 -5
- package/src/__tests__/runtime.test.ts +194 -0
- package/src/__tests__/stdlib/arr-len.test.ts +231 -0
- package/src/__tests__/stdlib/calculus.test.ts +99 -0
- package/src/__tests__/stdlib/dialog.test.ts +132 -0
- package/src/__tests__/stdlib/easing.test.ts +97 -0
- package/src/__tests__/stdlib/geometry.test.ts +171 -0
- package/src/__tests__/stdlib/heap.test.ts +121 -0
- package/src/__tests__/stdlib/list.test.ts +117 -0
- package/src/__tests__/stdlib/matrix.test.ts +140 -0
- package/src/__tests__/stdlib/pathfind.test.ts +151 -0
- package/src/__tests__/stdlib/scheduler.test.ts +171 -0
- package/src/__tests__/stdlib/sort-v2.test.ts +111 -0
- package/src/__tests__/stdlib/sort.test.ts +106 -0
- package/src/__tests__/stdlib/state.test.ts +164 -0
- package/src/__tests__/typechecker-strict.test.ts +21 -21
- package/src/__tests__/typechecker.test.ts +5 -3
- package/src/ast/types.ts +16 -3
- package/src/emit/compile.ts +32 -3
- package/src/emit/index.ts +24 -1
- package/src/emit/modules.ts +2 -1
- package/src/events/types.ts +5 -2
- package/src/examples/capture_the_flag.mcrs +2 -2
- package/src/examples/hunger_games.mcrs +4 -4
- package/src/examples/parkour_race.mcrs +8 -8
- package/src/examples/tutorial_01_hello.mcrs +63 -0
- package/src/examples/tutorial_02_variables.mcrs +157 -0
- package/src/examples/tutorial_03_functions_structs.mcrs +162 -0
- package/src/examples/tutorial_04_selectors.mcrs +139 -0
- package/src/examples/tutorial_05_decorators.mcrs +131 -0
- package/src/examples/tutorial_06_math_particles.mcrs +123 -0
- package/src/examples/tutorial_07_random.mcrs +142 -0
- package/src/examples/tutorial_08_coroutine.mcrs +163 -0
- package/src/examples/tutorial_09_precision.mcrs +154 -0
- package/src/examples/tutorial_10_kill_race.mcrs +289 -0
- package/src/examples/zombie_survival.mcrs +7 -7
- package/src/hir/lower.ts +101 -4
- package/src/hir/monomorphize.ts +11 -6
- package/src/hir/types.ts +14 -1
- package/src/lexer/index.ts +11 -2
- package/src/lir/lower.ts +8 -0
- package/src/lsp/server.ts +894 -54
- package/src/mc-test/client.ts +32 -1
- package/src/mir/lower.ts +703 -74
- package/src/mir/types.ts +1 -0
- package/src/mir/verify.ts +2 -0
- package/src/optimizer/constant_fold.ts +11 -6
- package/src/optimizer/coroutine.ts +89 -29
- package/src/optimizer/interprocedural.ts +4 -0
- package/src/parser/index.ts +175 -41
- package/src/runtime/index.ts +26 -0
- package/src/stdlib/advanced.mcrs +47 -0
- package/src/stdlib/bigint.mcrs +251 -0
- package/src/stdlib/calculus.mcrs +150 -0
- package/src/stdlib/color.mcrs +102 -82
- package/src/stdlib/combat.mcrs +18 -12
- package/src/stdlib/dialog.mcrs +55 -0
- package/src/stdlib/ecs.mcrs +238 -0
- package/src/stdlib/events.mcrs +29 -0
- package/src/stdlib/expr.mcrs +117 -0
- package/src/stdlib/fft.mcrs +177 -0
- package/src/stdlib/geometry.mcrs +89 -0
- package/src/stdlib/graph.mcrs +274 -0
- package/src/stdlib/heap.mcrs +175 -0
- package/src/stdlib/linalg.mcrs +260 -0
- package/src/stdlib/list.mcrs +99 -0
- package/src/stdlib/math.mcrs +121 -5
- package/src/stdlib/math_hp.mcrs +452 -0
- package/src/stdlib/matrix.mcrs +113 -0
- package/src/stdlib/ode.mcrs +168 -0
- package/src/stdlib/parabola.mcrs +160 -0
- package/src/stdlib/particles.mcrs +69 -0
- package/src/stdlib/pathfind.mcrs +321 -0
- package/src/stdlib/quaternion.mcrs +192 -0
- package/src/stdlib/random.mcrs +46 -1
- package/src/stdlib/scheduler.mcrs +271 -0
- package/src/stdlib/signal.mcrs +223 -0
- package/src/stdlib/sort.mcrs +194 -0
- package/src/stdlib/state.mcrs +65 -0
- package/src/stdlib/world.mcrs +24 -0
- package/src/typechecker/index.ts +88 -15
- package/test_trig.ts +43 -0
package/dist/src/parser/index.js
CHANGED
|
@@ -69,6 +69,8 @@ class Parser {
|
|
|
69
69
|
* `librarySources` compile option, each source is parsed by its own fresh
|
|
70
70
|
* Parser instance, so this flag never bleeds into user code. */
|
|
71
71
|
this.inLibraryMode = false;
|
|
72
|
+
/** Warnings accumulated during parsing (e.g. deprecated keyword usage). */
|
|
73
|
+
this.warnings = [];
|
|
72
74
|
this.tokens = tokens;
|
|
73
75
|
this.sourceLines = source?.split('\n') ?? [];
|
|
74
76
|
this.filePath = filePath;
|
|
@@ -148,7 +150,7 @@ class Parser {
|
|
|
148
150
|
this.advance();
|
|
149
151
|
const name = this.expect('ident');
|
|
150
152
|
namespace = name.value;
|
|
151
|
-
this.
|
|
153
|
+
this.match(';');
|
|
152
154
|
}
|
|
153
155
|
// Check for module declaration: `module library;` or `module <name>;`
|
|
154
156
|
// Library-mode: all functions parsed from this point are marked isLibraryFn=true.
|
|
@@ -165,7 +167,7 @@ class Parser {
|
|
|
165
167
|
// Named module declaration: `module math;`
|
|
166
168
|
moduleName = modKind.value;
|
|
167
169
|
}
|
|
168
|
-
this.
|
|
170
|
+
this.match(';');
|
|
169
171
|
}
|
|
170
172
|
// Parse struct, function, and import declarations
|
|
171
173
|
while (!this.check('eof')) {
|
|
@@ -206,7 +208,7 @@ class Parser {
|
|
|
206
208
|
else {
|
|
207
209
|
symbol = this.expect('ident').value;
|
|
208
210
|
}
|
|
209
|
-
this.
|
|
211
|
+
this.match(';');
|
|
210
212
|
imports.push(this.withLoc({ moduleName: modName, symbol }, importToken));
|
|
211
213
|
}
|
|
212
214
|
else {
|
|
@@ -283,7 +285,7 @@ class Parser {
|
|
|
283
285
|
// Infer type from value if not provided
|
|
284
286
|
const inferredType = type ?? (value.kind === 'str_lit' ? { kind: 'named', name: 'string' } :
|
|
285
287
|
value.kind === 'bool_lit' ? { kind: 'named', name: 'bool' } :
|
|
286
|
-
value.kind === 'float_lit' ? { kind: 'named', name: '
|
|
288
|
+
value.kind === 'float_lit' ? { kind: 'named', name: 'fixed' } :
|
|
287
289
|
{ kind: 'named', name: 'int' });
|
|
288
290
|
return this.withLoc({ name, type: inferredType, value }, constToken);
|
|
289
291
|
}
|
|
@@ -294,7 +296,7 @@ class Parser {
|
|
|
294
296
|
const type = this.parseType();
|
|
295
297
|
this.expect('=');
|
|
296
298
|
const init = this.parseExpr();
|
|
297
|
-
this.
|
|
299
|
+
this.match(';');
|
|
298
300
|
return this.withLoc({ kind: 'global', name, type, init, mutable }, token);
|
|
299
301
|
}
|
|
300
302
|
// -------------------------------------------------------------------------
|
|
@@ -338,8 +340,12 @@ class Parser {
|
|
|
338
340
|
returnType = this.parseType();
|
|
339
341
|
}
|
|
340
342
|
const body = this.parseBlock();
|
|
343
|
+
// Record the closing '}' line as endLine for accurate LSP scope detection
|
|
344
|
+
const closingBraceLine = this.tokens[this.pos - 1]?.line;
|
|
341
345
|
const fn = this.withLoc({ name, typeParams, params, returnType, decorators: filteredDecorators, body,
|
|
342
346
|
isLibraryFn: this.inLibraryMode || undefined, isExported }, fnToken);
|
|
347
|
+
if (fn.span && closingBraceLine)
|
|
348
|
+
fn.span.endLine = closingBraceLine;
|
|
343
349
|
return fn;
|
|
344
350
|
}
|
|
345
351
|
/** Parse a `declare fn name(params): returnType;` stub — no body, just discard. */
|
|
@@ -443,7 +449,7 @@ class Parser {
|
|
|
443
449
|
args.batch = parseInt(val, 10);
|
|
444
450
|
}
|
|
445
451
|
else if (key === 'onDone') {
|
|
446
|
-
args.onDone = val;
|
|
452
|
+
args.onDone = val.replace(/^["']|["']$/g, '');
|
|
447
453
|
}
|
|
448
454
|
else if (key === 'trigger') {
|
|
449
455
|
args.trigger = val;
|
|
@@ -506,8 +512,14 @@ class Parser {
|
|
|
506
512
|
// It's a tuple type
|
|
507
513
|
return { kind: 'tuple', elements };
|
|
508
514
|
}
|
|
509
|
-
if (token.kind === '
|
|
510
|
-
|
|
515
|
+
if (token.kind === 'float') {
|
|
516
|
+
this.advance();
|
|
517
|
+
const filePart = this.filePath ? `${this.filePath}:` : '';
|
|
518
|
+
this.warnings.push(`[DeprecatedType] ${filePart}line ${token.line}, col ${token.col}: 'float' is deprecated, use 'fixed' instead (×10000 fixed-point)`);
|
|
519
|
+
type = { kind: 'named', name: 'float' };
|
|
520
|
+
}
|
|
521
|
+
else if (token.kind === 'int' || token.kind === 'bool' ||
|
|
522
|
+
token.kind === 'fixed' || token.kind === 'string' || token.kind === 'void' ||
|
|
511
523
|
token.kind === 'BlockPos') {
|
|
512
524
|
this.advance();
|
|
513
525
|
type = { kind: 'named', name: token.kind };
|
|
@@ -529,6 +541,11 @@ class Parser {
|
|
|
529
541
|
this.expect('>');
|
|
530
542
|
type = { kind: 'option', inner };
|
|
531
543
|
}
|
|
544
|
+
else if (token.value === 'double' || token.value === 'byte' ||
|
|
545
|
+
token.value === 'short' || token.value === 'long' ||
|
|
546
|
+
token.value === 'format_string') {
|
|
547
|
+
type = { kind: 'named', name: token.value };
|
|
548
|
+
}
|
|
532
549
|
else {
|
|
533
550
|
type = { kind: 'struct', name: token.value };
|
|
534
551
|
}
|
|
@@ -645,7 +662,7 @@ class Parser {
|
|
|
645
662
|
}
|
|
646
663
|
this.expect('=');
|
|
647
664
|
const init = this.parseExpr();
|
|
648
|
-
this.
|
|
665
|
+
this.match(';');
|
|
649
666
|
return this.withLoc({ kind: 'let_destruct', names, type, init }, letToken);
|
|
650
667
|
}
|
|
651
668
|
const name = this.expect('ident').value;
|
|
@@ -655,16 +672,16 @@ class Parser {
|
|
|
655
672
|
}
|
|
656
673
|
this.expect('=');
|
|
657
674
|
const init = this.parseExpr();
|
|
658
|
-
this.
|
|
675
|
+
this.match(';');
|
|
659
676
|
return this.withLoc({ kind: 'let', name, type, init }, letToken);
|
|
660
677
|
}
|
|
661
678
|
parseReturnStmt() {
|
|
662
679
|
const returnToken = this.expect('return');
|
|
663
680
|
let value;
|
|
664
|
-
if (!this.check(';')) {
|
|
681
|
+
if (!this.check(';') && !this.check('}') && !this.check('eof')) {
|
|
665
682
|
value = this.parseExpr();
|
|
666
683
|
}
|
|
667
|
-
this.
|
|
684
|
+
this.match(';');
|
|
668
685
|
return this.withLoc({ kind: 'return', value }, returnToken);
|
|
669
686
|
}
|
|
670
687
|
parseIfStmt() {
|
|
@@ -763,29 +780,57 @@ class Parser {
|
|
|
763
780
|
this.expect('in');
|
|
764
781
|
let start;
|
|
765
782
|
let end;
|
|
783
|
+
let inclusive = false;
|
|
766
784
|
if (this.check('range_lit')) {
|
|
767
|
-
// Literal range: 0..10, 0..count, 0..=9
|
|
785
|
+
// Literal range: 0..10, 0..count, 0..=9, 0..=count
|
|
768
786
|
const rangeToken = this.advance();
|
|
769
|
-
const
|
|
787
|
+
const raw = rangeToken.value;
|
|
788
|
+
// Detect inclusive: ends with = after .. (e.g. "0..=" or "..=")
|
|
789
|
+
const incl = raw.includes('..=');
|
|
790
|
+
inclusive = incl;
|
|
791
|
+
const range = this.parseRangeValue(raw);
|
|
770
792
|
start = this.withLoc({ kind: 'int_lit', value: range.min ?? 0 }, rangeToken);
|
|
771
793
|
if (range.max !== null && range.max !== undefined) {
|
|
772
|
-
// Fully numeric: 0..10
|
|
794
|
+
// Fully numeric: 0..10 or 0..=9
|
|
773
795
|
end = this.withLoc({ kind: 'int_lit', value: range.max }, rangeToken);
|
|
774
796
|
}
|
|
775
797
|
else {
|
|
776
|
-
// Open-ended: "0.." — parse the end expression from next tokens
|
|
798
|
+
// Open-ended: "0.." or "0..=" — parse the end expression from next tokens
|
|
777
799
|
end = this.parseUnaryExpr();
|
|
778
800
|
}
|
|
779
801
|
}
|
|
780
802
|
else {
|
|
781
|
-
// Dynamic range: expr..expr
|
|
782
|
-
//
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
803
|
+
// Dynamic range: expr..expr or expr..=expr
|
|
804
|
+
// parseExpr stops before range_lit (not in BINARY_OPS), so this is safe
|
|
805
|
+
const arrayOrStart = this.parseExpr();
|
|
806
|
+
// --- for_each detection: for item in arr { ... } ---
|
|
807
|
+
// If after parsing the expression there is no range_lit, it's a for_each (array iteration)
|
|
808
|
+
if (!this.check('range_lit')) {
|
|
809
|
+
const body = this.parseBlock();
|
|
810
|
+
return this.withLoc({ kind: 'for_each', binding: varName, array: arrayOrStart, body }, forToken);
|
|
811
|
+
}
|
|
812
|
+
start = arrayOrStart;
|
|
813
|
+
// Consume the range_lit token which should be ".." or "..="
|
|
814
|
+
if (this.check('range_lit')) {
|
|
815
|
+
const rangeOp = this.advance();
|
|
816
|
+
inclusive = rangeOp.value.includes('=');
|
|
817
|
+
// If the range_lit captured digits after .., use them as end
|
|
818
|
+
const afterOp = rangeOp.value.replace(/^\.\.=?/, '');
|
|
819
|
+
if (afterOp.length > 0) {
|
|
820
|
+
end = this.withLoc({ kind: 'int_lit', value: parseInt(afterOp, 10) }, rangeOp);
|
|
821
|
+
}
|
|
822
|
+
else {
|
|
823
|
+
end = this.parseExpr();
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
this.error('Expected .. or ..= in for-range expression');
|
|
828
|
+
start = this.withLoc({ kind: 'int_lit', value: 0 }, this.peek());
|
|
829
|
+
end = this.withLoc({ kind: 'int_lit', value: 0 }, this.peek());
|
|
830
|
+
}
|
|
786
831
|
}
|
|
787
832
|
const body = this.parseBlock();
|
|
788
|
-
return this.withLoc({ kind: 'for_range', varName, start, end, body }, forToken);
|
|
833
|
+
return this.withLoc({ kind: 'for_range', varName, start, end, inclusive, body }, forToken);
|
|
789
834
|
}
|
|
790
835
|
parseForeachStmt() {
|
|
791
836
|
const foreachToken = this.expect('foreach');
|
|
@@ -809,24 +854,60 @@ class Parser {
|
|
|
809
854
|
const body = this.parseBlock();
|
|
810
855
|
return this.withLoc({ kind: 'foreach', binding, iterable, body, executeContext }, foreachToken);
|
|
811
856
|
}
|
|
857
|
+
parseMatchPattern() {
|
|
858
|
+
// Wildcard: _
|
|
859
|
+
if (this.check('ident') && this.peek().value === '_') {
|
|
860
|
+
this.advance();
|
|
861
|
+
return { kind: 'PatWild' };
|
|
862
|
+
}
|
|
863
|
+
// None
|
|
864
|
+
if (this.check('ident') && this.peek().value === 'None') {
|
|
865
|
+
this.advance();
|
|
866
|
+
return { kind: 'PatNone' };
|
|
867
|
+
}
|
|
868
|
+
// Some(x)
|
|
869
|
+
if (this.check('ident') && this.peek().value === 'Some') {
|
|
870
|
+
this.advance(); // consume 'Some'
|
|
871
|
+
this.expect('(');
|
|
872
|
+
const binding = this.expect('ident').value;
|
|
873
|
+
this.expect(')');
|
|
874
|
+
return { kind: 'PatSome', binding };
|
|
875
|
+
}
|
|
876
|
+
// Integer literal
|
|
877
|
+
if (this.check('int_lit')) {
|
|
878
|
+
const tok = this.advance();
|
|
879
|
+
return { kind: 'PatInt', value: parseInt(tok.value, 10) };
|
|
880
|
+
}
|
|
881
|
+
// Negative integer literal: -N
|
|
882
|
+
if (this.check('-') && this.peek(1).kind === 'int_lit') {
|
|
883
|
+
this.advance(); // consume '-'
|
|
884
|
+
const tok = this.advance();
|
|
885
|
+
return { kind: 'PatInt', value: -parseInt(tok.value, 10) };
|
|
886
|
+
}
|
|
887
|
+
// Legacy: range_lit or any other expression (e.g. 0..59)
|
|
888
|
+
const e = this.parseExpr();
|
|
889
|
+
return { kind: 'PatExpr', expr: e };
|
|
890
|
+
}
|
|
812
891
|
parseMatchStmt() {
|
|
813
892
|
const matchToken = this.expect('match');
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
this.
|
|
893
|
+
// Support both `match (expr)` (legacy) and `match expr` (new syntax)
|
|
894
|
+
let expr;
|
|
895
|
+
if (this.check('(')) {
|
|
896
|
+
// Peek ahead — if it looks like `(expr)` followed by `{`, consume parens
|
|
897
|
+
this.advance(); // consume '('
|
|
898
|
+
expr = this.parseExpr();
|
|
899
|
+
this.expect(')');
|
|
900
|
+
}
|
|
901
|
+
else {
|
|
902
|
+
expr = this.parseExpr();
|
|
903
|
+
}
|
|
817
904
|
this.expect('{');
|
|
818
905
|
const arms = [];
|
|
819
906
|
while (!this.check('}') && !this.check('eof')) {
|
|
820
|
-
|
|
821
|
-
if (this.check('ident') && this.peek().value === '_') {
|
|
822
|
-
this.advance();
|
|
823
|
-
pattern = null;
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
826
|
-
pattern = this.parseExpr();
|
|
827
|
-
}
|
|
907
|
+
const pattern = this.parseMatchPattern();
|
|
828
908
|
this.expect('=>');
|
|
829
909
|
const body = this.parseBlock();
|
|
910
|
+
this.match(','); // optional trailing comma
|
|
830
911
|
arms.push({ pattern, body });
|
|
831
912
|
}
|
|
832
913
|
this.expect('}');
|
|
@@ -1034,7 +1115,7 @@ class Parser {
|
|
|
1034
1115
|
}
|
|
1035
1116
|
parseExprStmt() {
|
|
1036
1117
|
const expr = this.parseExpr();
|
|
1037
|
-
this.
|
|
1118
|
+
this.match(';');
|
|
1038
1119
|
const exprToken = this.getLocToken(expr) ?? this.peek();
|
|
1039
1120
|
return this.withLoc({ kind: 'expr', expr }, exprToken);
|
|
1040
1121
|
}
|
|
@@ -1211,10 +1292,32 @@ class Parser {
|
|
|
1211
1292
|
expr = this.withLoc({ kind: 'member', obj: expr, field }, this.getLocToken(expr) ?? this.tokens[this.pos - 1]);
|
|
1212
1293
|
continue;
|
|
1213
1294
|
}
|
|
1295
|
+
// Type cast: expr as Type
|
|
1296
|
+
// Only parse 'as' as a cast when followed by a type token (not a selector like @a)
|
|
1297
|
+
if (this.check('as') && this.isTypeCastAs()) {
|
|
1298
|
+
const asToken = this.advance(); // consume 'as'
|
|
1299
|
+
const targetType = this.parseType();
|
|
1300
|
+
expr = this.withLoc({ kind: 'type_cast', expr, targetType }, this.getLocToken(expr) ?? asToken);
|
|
1301
|
+
continue;
|
|
1302
|
+
}
|
|
1214
1303
|
break;
|
|
1215
1304
|
}
|
|
1216
1305
|
return expr;
|
|
1217
1306
|
}
|
|
1307
|
+
/** Returns true if the current 'as' token is a type cast (not a context block) */
|
|
1308
|
+
isTypeCastAs() {
|
|
1309
|
+
// Look ahead past 'as' to see if the next token looks like a type
|
|
1310
|
+
const next = this.tokens[this.pos + 1];
|
|
1311
|
+
if (!next)
|
|
1312
|
+
return false;
|
|
1313
|
+
const typeStartTokens = new Set(['int', 'bool', 'float', 'fixed', 'string', 'void', 'BlockPos', '(']);
|
|
1314
|
+
if (typeStartTokens.has(next.kind))
|
|
1315
|
+
return true;
|
|
1316
|
+
if (next.kind === 'ident' && (next.value === 'double' || next.value === 'byte' || next.value === 'short' ||
|
|
1317
|
+
next.value === 'long' || next.value === 'selector' || next.value === 'Option'))
|
|
1318
|
+
return true;
|
|
1319
|
+
return false;
|
|
1320
|
+
}
|
|
1218
1321
|
parseArgs() {
|
|
1219
1322
|
const args = [];
|
|
1220
1323
|
if (!this.check(')')) {
|
|
@@ -1318,6 +1421,13 @@ class Parser {
|
|
|
1318
1421
|
sel: this.parseSelectorValue(token.value),
|
|
1319
1422
|
}, token);
|
|
1320
1423
|
}
|
|
1424
|
+
// Named struct literal: TypeName { field: value, ... }
|
|
1425
|
+
// Require at least one field (ident + :) to avoid ambiguity with blocks.
|
|
1426
|
+
if (token.kind === 'ident' && this.peek(1).kind === '{' &&
|
|
1427
|
+
this.peek(2).kind === 'ident' && this.peek(3).kind === ':') {
|
|
1428
|
+
this.advance(); // consume type name (used only for disambiguation, dropped from AST)
|
|
1429
|
+
return this.parseStructLit();
|
|
1430
|
+
}
|
|
1321
1431
|
// Some(expr) — Option constructor
|
|
1322
1432
|
if (token.kind === 'ident' && token.value === 'Some' && this.peek(1).kind === '(') {
|
|
1323
1433
|
this.advance(); // consume 'Some'
|
|
@@ -1637,6 +1747,7 @@ class Parser {
|
|
|
1637
1747
|
const isNamedType = token.kind === 'int' ||
|
|
1638
1748
|
token.kind === 'bool' ||
|
|
1639
1749
|
token.kind === 'float' ||
|
|
1750
|
+
token.kind === 'fixed' ||
|
|
1640
1751
|
token.kind === 'string' ||
|
|
1641
1752
|
token.kind === 'void' ||
|
|
1642
1753
|
token.kind === 'BlockPos' ||
|
|
@@ -1868,21 +1979,42 @@ class Parser {
|
|
|
1868
1979
|
}
|
|
1869
1980
|
parseRangeValue(value) {
|
|
1870
1981
|
// ..5 → { max: 5 }
|
|
1982
|
+
// ..=5 → { max: 5 }
|
|
1871
1983
|
// 1.. → { min: 1 }
|
|
1984
|
+
// 1..= → { min: 1 } (open-ended inclusive, end parsed separately)
|
|
1872
1985
|
// 1..10 → { min: 1, max: 10 }
|
|
1986
|
+
// 1..=10 → { min: 1, max: 10 }
|
|
1873
1987
|
// 5 → { min: 5, max: 5 } (exact match)
|
|
1988
|
+
if (value.startsWith('..=')) {
|
|
1989
|
+
const rest = value.slice(3);
|
|
1990
|
+
if (!rest)
|
|
1991
|
+
return {}; // open upper bound, no max
|
|
1992
|
+
const max = parseInt(rest, 10);
|
|
1993
|
+
return { max };
|
|
1994
|
+
}
|
|
1874
1995
|
if (value.startsWith('..')) {
|
|
1875
|
-
const
|
|
1996
|
+
const rest = value.slice(2);
|
|
1997
|
+
if (!rest)
|
|
1998
|
+
return {}; // open upper bound, no max
|
|
1999
|
+
const max = parseInt(rest, 10);
|
|
1876
2000
|
return { max };
|
|
1877
2001
|
}
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
2002
|
+
const inclIdx = value.indexOf('..=');
|
|
2003
|
+
if (inclIdx !== -1) {
|
|
2004
|
+
const min = parseInt(value.slice(0, inclIdx), 10);
|
|
2005
|
+
const rest = value.slice(inclIdx + 3);
|
|
2006
|
+
if (!rest)
|
|
2007
|
+
return { min }; // open-ended inclusive
|
|
2008
|
+
const max = parseInt(rest, 10);
|
|
2009
|
+
return { min, max };
|
|
1881
2010
|
}
|
|
1882
2011
|
const dotIndex = value.indexOf('..');
|
|
1883
2012
|
if (dotIndex !== -1) {
|
|
1884
2013
|
const min = parseInt(value.slice(0, dotIndex), 10);
|
|
1885
|
-
const
|
|
2014
|
+
const rest = value.slice(dotIndex + 2);
|
|
2015
|
+
if (!rest)
|
|
2016
|
+
return { min }; // open-ended
|
|
2017
|
+
const max = parseInt(rest, 10);
|
|
1886
2018
|
return { min, max };
|
|
1887
2019
|
}
|
|
1888
2020
|
// Exact value
|
|
@@ -240,6 +240,11 @@ class MCRuntime {
|
|
|
240
240
|
this.namespace = namespace;
|
|
241
241
|
// Initialize default objective
|
|
242
242
|
this.scoreboard.set('rs', new Map());
|
|
243
|
+
// Pre-populate math:tables with the sin LUT (same values as _math_init in math.mcrs).
|
|
244
|
+
// This avoids requiring a real MC server for unit tests that use sin_fixed/cos_fixed.
|
|
245
|
+
// Values: sin(0°..90°) × 1000, 91 entries.
|
|
246
|
+
const SIN_TABLE = [0, 17, 35, 52, 70, 87, 105, 122, 139, 156, 174, 191, 208, 225, 242, 259, 276, 292, 309, 326, 342, 358, 375, 391, 407, 423, 438, 454, 469, 485, 500, 515, 530, 545, 559, 574, 588, 602, 616, 629, 643, 656, 669, 682, 695, 707, 719, 731, 743, 755, 766, 777, 788, 799, 809, 819, 829, 839, 848, 857, 866, 875, 883, 891, 899, 906, 914, 921, 927, 934, 940, 946, 951, 956, 961, 966, 970, 974, 978, 982, 985, 988, 990, 993, 995, 996, 998, 999, 999, 1000, 1000];
|
|
247
|
+
this.setStorageField('math:tables', 'sin', SIN_TABLE);
|
|
243
248
|
}
|
|
244
249
|
// -------------------------------------------------------------------------
|
|
245
250
|
// Datapack Loading
|
|
@@ -729,6 +734,25 @@ class MCRuntime {
|
|
|
729
734
|
// -------------------------------------------------------------------------
|
|
730
735
|
execFunctionCmd(cmd, executor) {
|
|
731
736
|
let fnRef = cmd.slice(9).trim(); // remove 'function '
|
|
737
|
+
// Handle storage_get_int builtin — compiled as `function ns:storage_get_int`
|
|
738
|
+
// Parameters: $p0=0 (storagePath, lost as string), $p1=0 (fieldName, lost),
|
|
739
|
+
// $p2=index. Since string params are lost, we use a hardcoded lookup against
|
|
740
|
+
// the pre-populated math:tables.sin (the only stdlib user of this builtin).
|
|
741
|
+
// The result is written to $ret.
|
|
742
|
+
if (fnRef.endsWith(':storage_get_int')) {
|
|
743
|
+
const ns = this.namespace;
|
|
744
|
+
const obj = `__${ns}`;
|
|
745
|
+
const idx = this.getScore('$p2', obj);
|
|
746
|
+
const arr = this.getStorageField('math:tables', 'sin');
|
|
747
|
+
const value = Array.isArray(arr) ? (arr[idx] ?? 0) : 0;
|
|
748
|
+
this.setScore('$ret', obj, value);
|
|
749
|
+
return true;
|
|
750
|
+
}
|
|
751
|
+
// Handle storage_set_array builtin — compiled as `function ns:storage_set_array`
|
|
752
|
+
// The sin LUT is already pre-populated in the constructor; this is a no-op.
|
|
753
|
+
if (fnRef.endsWith(':storage_set_array')) {
|
|
754
|
+
return true;
|
|
755
|
+
}
|
|
732
756
|
// Handle 'function ns:name with storage ns:path' — MC macro calling convention.
|
|
733
757
|
// The called function may have $( ) placeholders that need to be expanded
|
|
734
758
|
// using the provided storage compound. We execute the function after
|
|
@@ -8,6 +8,8 @@ import type { Program } from '../ast/types';
|
|
|
8
8
|
import { DiagnosticError } from '../diagnostics';
|
|
9
9
|
export declare class TypeChecker {
|
|
10
10
|
private collector;
|
|
11
|
+
private filePath?;
|
|
12
|
+
private lintWarnings;
|
|
11
13
|
private functions;
|
|
12
14
|
private implMethods;
|
|
13
15
|
private structs;
|
|
@@ -24,6 +26,9 @@ export declare class TypeChecker {
|
|
|
24
26
|
constructor(source?: string, filePath?: string);
|
|
25
27
|
private getNodeLocation;
|
|
26
28
|
private report;
|
|
29
|
+
private warnLint;
|
|
30
|
+
/** Returns lint warnings (non-blocking). */
|
|
31
|
+
getWarnings(): string[];
|
|
27
32
|
/**
|
|
28
33
|
* Type check a program. Returns collected errors.
|
|
29
34
|
*/
|
|
@@ -59,7 +64,9 @@ export declare class TypeChecker {
|
|
|
59
64
|
private popSelfType;
|
|
60
65
|
/** Get current @s type */
|
|
61
66
|
private getCurrentSelfType;
|
|
62
|
-
/** Returns true if expected/actual are a numeric type mismatch (int vs float).
|
|
67
|
+
/** Returns true if expected/actual are a numeric type mismatch (int vs float/fixed/double).
|
|
68
|
+
* These pairs are NOT implicitly compatible — require explicit `as` cast.
|
|
69
|
+
* Only int↔byte/short/long remain implicitly compatible (MC NBT narrowing). */
|
|
63
70
|
private isNumericMismatch;
|
|
64
71
|
private typesMatch;
|
|
65
72
|
private typeToString;
|
|
@@ -112,6 +112,7 @@ const BUILTIN_SIGNATURES = {
|
|
|
112
112
|
// ---------------------------------------------------------------------------
|
|
113
113
|
class TypeChecker {
|
|
114
114
|
constructor(source, filePath) {
|
|
115
|
+
this.lintWarnings = [];
|
|
115
116
|
this.functions = new Map();
|
|
116
117
|
this.implMethods = new Map();
|
|
117
118
|
this.structs = new Map();
|
|
@@ -136,6 +137,7 @@ class TypeChecker {
|
|
|
136
137
|
['subtitle', { messageIndex: 1 }],
|
|
137
138
|
]);
|
|
138
139
|
this.collector = new diagnostics_1.DiagnosticCollector(source, filePath);
|
|
140
|
+
this.filePath = filePath;
|
|
139
141
|
}
|
|
140
142
|
getNodeLocation(node) {
|
|
141
143
|
const span = node?.span;
|
|
@@ -148,6 +150,15 @@ class TypeChecker {
|
|
|
148
150
|
const { line, col } = this.getNodeLocation(node);
|
|
149
151
|
this.collector.error('TypeError', message, line, col);
|
|
150
152
|
}
|
|
153
|
+
warnLint(message, node) {
|
|
154
|
+
const { line, col } = this.getNodeLocation(node);
|
|
155
|
+
const filePart = this.filePath ? `${this.filePath}:` : '';
|
|
156
|
+
this.lintWarnings.push(`${filePart}line ${line}, col ${col}: ${message}`);
|
|
157
|
+
}
|
|
158
|
+
/** Returns lint warnings (non-blocking). */
|
|
159
|
+
getWarnings() {
|
|
160
|
+
return this.lintWarnings;
|
|
161
|
+
}
|
|
151
162
|
/**
|
|
152
163
|
* Type check a program. Returns collected errors.
|
|
153
164
|
*/
|
|
@@ -350,17 +361,19 @@ class TypeChecker {
|
|
|
350
361
|
case 'match':
|
|
351
362
|
this.checkExpr(stmt.expr);
|
|
352
363
|
for (const arm of stmt.arms) {
|
|
353
|
-
if (arm.pattern) {
|
|
354
|
-
|
|
364
|
+
if (arm.pattern.kind === 'PatExpr') {
|
|
365
|
+
// Legacy: check the wrapped expression against the subject type
|
|
366
|
+
this.checkExpr(arm.pattern.expr);
|
|
355
367
|
const subjectType = this.inferType(stmt.expr);
|
|
356
|
-
const patternType = this.inferType(arm.pattern);
|
|
368
|
+
const patternType = this.inferType(arm.pattern.expr);
|
|
357
369
|
// Skip check if either type is unknown (void) — struct field access not yet inferred
|
|
358
370
|
const isUnknown = (t) => t.kind === 'named' && t.name === 'void';
|
|
359
371
|
if (!isUnknown(subjectType) && !isUnknown(patternType) &&
|
|
360
372
|
!this.typesMatch(subjectType, patternType)) {
|
|
361
|
-
this.report('Match arm pattern type must match subject type', arm.pattern);
|
|
373
|
+
this.report('Match arm pattern type must match subject type', arm.pattern.expr);
|
|
362
374
|
}
|
|
363
375
|
}
|
|
376
|
+
// PatSome / PatNone / PatInt / PatWild are structurally typed — no expr to check
|
|
364
377
|
this.checkBlock(arm.body);
|
|
365
378
|
}
|
|
366
379
|
break;
|
|
@@ -472,6 +485,15 @@ class TypeChecker {
|
|
|
472
485
|
if (stmt.value) {
|
|
473
486
|
const actualType = this.inferType(stmt.value, expectedType);
|
|
474
487
|
this.checkExpr(stmt.value, expectedType);
|
|
488
|
+
// Warn when returning a float-typed result of arithmetic — the arithmetic
|
|
489
|
+
// itself is the problem, not just the type annotation.
|
|
490
|
+
const returnIsFloat = expectedType.kind === 'named' && expectedType.name === 'float';
|
|
491
|
+
if (returnIsFloat && stmt.value.kind === 'binary') {
|
|
492
|
+
const arithmeticOps = ['+', '-', '*', '/', '%'];
|
|
493
|
+
if (arithmeticOps.includes(stmt.value.op)) {
|
|
494
|
+
this.warnLint(`[FloatArithmetic] 'float' is a system boundary type (MC NBT float); use 'fixed' for arithmetic instead.`, stmt.value);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
475
497
|
if (this.isNumericMismatch(expectedType, actualType)) {
|
|
476
498
|
// Explicit numeric conversion required for return statements
|
|
477
499
|
this.report(`Return type mismatch: cannot implicitly convert ${this.typeToString(actualType)} to ${this.typeToString(expectedType)}` +
|
|
@@ -507,10 +529,28 @@ class TypeChecker {
|
|
|
507
529
|
case 'static_call':
|
|
508
530
|
this.checkStaticCallExpr(expr);
|
|
509
531
|
break;
|
|
510
|
-
case 'binary':
|
|
532
|
+
case 'binary': {
|
|
511
533
|
this.checkExpr(expr.left);
|
|
512
534
|
this.checkExpr(expr.right);
|
|
535
|
+
const arithmeticOps = ['+', '-', '*', '/', '%'];
|
|
536
|
+
if (arithmeticOps.includes(expr.op)) {
|
|
537
|
+
const leftType = this.inferType(expr.left);
|
|
538
|
+
const rightType = this.inferType(expr.right);
|
|
539
|
+
const leftIsString = leftType.kind === 'named' && (leftType.name === 'string' || leftType.name === 'format_string');
|
|
540
|
+
const rightIsString = rightType.kind === 'named' && (rightType.name === 'string' || rightType.name === 'format_string');
|
|
541
|
+
if (leftIsString || rightIsString) {
|
|
542
|
+
// String concatenation with + is not supported. Use f-strings instead.
|
|
543
|
+
this.report(`[StringConcat] String concatenation with '+' is not supported. Use f-strings instead: f"text{variable}" — e.g. f"Score: {score}"`, expr);
|
|
544
|
+
}
|
|
545
|
+
// Warn when float is used in arithmetic — float is a MC NBT system boundary type
|
|
546
|
+
const leftIsFloat = leftType.kind === 'named' && leftType.name === 'float';
|
|
547
|
+
const rightIsFloat = rightType.kind === 'named' && rightType.name === 'float';
|
|
548
|
+
if (leftIsFloat || rightIsFloat) {
|
|
549
|
+
this.warnLint(`[FloatArithmetic] 'float' is a system boundary type (MC NBT); use 'fixed' for arithmetic. Float arithmetic results are undefined.`, expr);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
513
552
|
break;
|
|
553
|
+
}
|
|
514
554
|
case 'is_check': {
|
|
515
555
|
this.checkExpr(expr.expr);
|
|
516
556
|
const checkedType = this.inferType(expr.expr);
|
|
@@ -570,7 +610,7 @@ class TypeChecker {
|
|
|
570
610
|
// Skip check if type is unknown (void) — struct field access not yet fully inferred
|
|
571
611
|
const isUnknown = partType.kind === 'named' && partType.name === 'void';
|
|
572
612
|
if (!isUnknown &&
|
|
573
|
-
!(partType.kind === 'named' &&
|
|
613
|
+
!(partType.kind === 'named' && ['int', 'string', 'format_string', 'fixed', 'double', 'bool', 'byte', 'short', 'long'].includes(partType.name))) {
|
|
574
614
|
this.report(`f-string placeholder must be int or string, got ${this.typeToString(partType)}`, part.expr);
|
|
575
615
|
}
|
|
576
616
|
}
|
|
@@ -617,6 +657,9 @@ class TypeChecker {
|
|
|
617
657
|
case 'long_lit':
|
|
618
658
|
case 'double_lit':
|
|
619
659
|
break;
|
|
660
|
+
case 'type_cast':
|
|
661
|
+
this.checkExpr(expr.expr);
|
|
662
|
+
break;
|
|
620
663
|
}
|
|
621
664
|
}
|
|
622
665
|
checkCallExpr(expr) {
|
|
@@ -776,7 +819,7 @@ class TypeChecker {
|
|
|
776
819
|
// Entity marker (void) - allow all members
|
|
777
820
|
if (varType.name !== 'void') {
|
|
778
821
|
// Only warn for primitive types
|
|
779
|
-
if (['int', 'bool', 'float', 'string', 'byte', 'short', 'long', 'double'].includes(varType.name)) {
|
|
822
|
+
if (['int', 'bool', 'float', 'fixed', 'string', 'byte', 'short', 'long', 'double'].includes(varType.name)) {
|
|
780
823
|
this.report(`Cannot access member '${expr.field}' on ${this.typeToString(varType)}`, expr);
|
|
781
824
|
}
|
|
782
825
|
}
|
|
@@ -878,7 +921,7 @@ class TypeChecker {
|
|
|
878
921
|
case 'int_lit':
|
|
879
922
|
return { kind: 'named', name: 'int' };
|
|
880
923
|
case 'float_lit':
|
|
881
|
-
return { kind: 'named', name: '
|
|
924
|
+
return { kind: 'named', name: 'fixed' };
|
|
882
925
|
case 'byte_lit':
|
|
883
926
|
return { kind: 'named', name: 'byte' };
|
|
884
927
|
case 'short_lit':
|
|
@@ -1030,6 +1073,9 @@ class TypeChecker {
|
|
|
1030
1073
|
return expectedType;
|
|
1031
1074
|
return { kind: 'option', inner: { kind: 'named', name: 'void' } };
|
|
1032
1075
|
}
|
|
1076
|
+
case 'type_cast':
|
|
1077
|
+
// The result type of (expr as T) is T
|
|
1078
|
+
return this.normalizeType(expr.targetType);
|
|
1033
1079
|
case 'lambda':
|
|
1034
1080
|
return this.inferLambdaType(expr, expectedType && this.normalizeType(expectedType).kind === 'function_type'
|
|
1035
1081
|
? this.normalizeType(expectedType)
|
|
@@ -1120,14 +1166,19 @@ class TypeChecker {
|
|
|
1120
1166
|
getCurrentSelfType() {
|
|
1121
1167
|
return this.selfTypeStack[this.selfTypeStack.length - 1];
|
|
1122
1168
|
}
|
|
1123
|
-
/** Returns true if expected/actual are a numeric type mismatch (int vs float).
|
|
1169
|
+
/** Returns true if expected/actual are a numeric type mismatch (int vs float/fixed/double).
|
|
1170
|
+
* These pairs are NOT implicitly compatible — require explicit `as` cast.
|
|
1171
|
+
* Only int↔byte/short/long remain implicitly compatible (MC NBT narrowing). */
|
|
1124
1172
|
isNumericMismatch(expected, actual) {
|
|
1125
1173
|
if (expected.kind !== 'named' || actual.kind !== 'named')
|
|
1126
1174
|
return false;
|
|
1127
1175
|
const numericPairs = [
|
|
1128
1176
|
['int', 'float'], ['float', 'int'],
|
|
1177
|
+
['int', 'fixed'], ['fixed', 'int'],
|
|
1129
1178
|
['int', 'double'], ['double', 'int'],
|
|
1130
1179
|
['float', 'double'], ['double', 'float'],
|
|
1180
|
+
['fixed', 'double'], ['double', 'fixed'],
|
|
1181
|
+
// float and fixed are compatible (float is deprecated alias for fixed)
|
|
1131
1182
|
];
|
|
1132
1183
|
return numericPairs.some(([e, a]) => expected.name === e && actual.name === a);
|
|
1133
1184
|
}
|
|
@@ -1160,12 +1211,20 @@ class TypeChecker {
|
|
|
1160
1211
|
return true;
|
|
1161
1212
|
if (expected.name === actual.name)
|
|
1162
1213
|
return true;
|
|
1163
|
-
//
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1166
|
-
|
|
1214
|
+
// float is a deprecated alias for fixed — they are interchangeable
|
|
1215
|
+
const floatFixed = (expected.name === 'float' || expected.name === 'fixed') &&
|
|
1216
|
+
(actual.name === 'float' || actual.name === 'fixed');
|
|
1217
|
+
if (floatFixed)
|
|
1218
|
+
return true;
|
|
1219
|
+
// No implicit numeric promotions between int/fixed/double/float.
|
|
1220
|
+
// Users must use explicit `as` casts: x as fixed, x as double, etc.
|
|
1221
|
+
// Only byte/short/long ↔ int remain implicitly compatible (MC NBT type narrowing).
|
|
1222
|
+
const nbtNarrowing = [
|
|
1223
|
+
['int', 'byte'], ['byte', 'int'],
|
|
1224
|
+
['int', 'short'], ['short', 'int'],
|
|
1225
|
+
['int', 'long'], ['long', 'int'],
|
|
1167
1226
|
];
|
|
1168
|
-
if (
|
|
1227
|
+
if (nbtNarrowing.some(([e, a]) => expected.name === e && actual.name === a))
|
|
1169
1228
|
return true;
|
|
1170
1229
|
return false;
|
|
1171
1230
|
}
|