├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ └── main.yml ├── .gitignore ├── .vscode ├── extensions.json └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── examples ├── basic │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_1_18 │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_1_20 │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_backslash_continuation │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_bake_macros │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_debug │ ├── beet-location.yml │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_embed │ ├── beet.yml │ ├── demo.py │ └── src │ │ └── data │ │ └── demo │ │ ├── functions │ │ └── stuff.mcfunction │ │ └── loot_tables │ │ └── foo.json ├── basic_formatting │ ├── beet.yml │ └── foo.mcfunction ├── basic_implicit_execute │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_json │ ├── beet.yml │ ├── demo.py │ └── src │ │ └── data │ │ └── demo │ │ ├── functions │ │ └── foo.mcfunction │ │ └── loot_tables │ │ ├── foo.json │ │ └── zombified_piglin.json ├── basic_lint │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_macro_line │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ ├── foo.mcfunction │ │ └── thing.mcfunction ├── basic_messages │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ ├── functions │ │ └── foo.mcfunction │ │ └── messages │ │ └── greeting.json ├── basic_multiline │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_nested_location │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_nested_resources │ ├── beet.yml │ └── src │ │ ├── assets │ │ └── minecraft │ │ │ └── models │ │ │ └── item │ │ │ └── bow.json │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_nested_test │ ├── beet.yml │ ├── demo.py │ └── src │ │ └── data │ │ └── demo │ │ ├── functions │ │ └── stuff.mcfunction │ │ └── tests │ │ └── foo.mcfunction ├── basic_nested_yaml │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_nesting │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ ├── foo.mcfunction │ │ ├── wat.mcfunction │ │ └── xct.mcfunction ├── basic_overlay │ ├── beet.yml │ └── src │ │ ├── data │ │ └── demo │ │ │ └── functions │ │ │ └── foo.mcfunction │ │ └── dummy_overlay │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_overlay_composite │ ├── beet.yml │ ├── foo.mcfunction │ ├── foo_old.mcfunction │ └── pack.mcmeta ├── basic_preserve │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_raw │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_readonly │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_relative_location │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ ├── bar.mcfunction │ │ ├── folder │ │ └── wat.mcfunction │ │ ├── foo.mcfunction │ │ └── other.mcfunction ├── basic_source_map │ ├── beet.yml │ ├── demo.py │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── basic_stats │ ├── beet.yml │ ├── demo.py │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── custom_command │ ├── beet.yml │ ├── demo.py │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── custom_execute_destination │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ ├── bar.mcfunction │ │ └── foo.mcfunction ├── gather_objectives │ ├── beet.yml │ ├── demo.py │ └── src │ │ └── data │ │ └── demo │ │ └── functions │ │ └── foo.mcfunction ├── kitchen_sink │ ├── beet.yml │ └── src │ │ └── data │ │ └── demo │ │ ├── functions │ │ ├── function_tag.mcfunction │ │ ├── implicit_execute.mcfunction │ │ ├── messages.mcfunction │ │ └── nesting.mcfunction │ │ └── messages │ │ └── greet.json └── load_command_tree │ ├── beet.yml │ ├── commands.json │ └── src │ └── data │ └── demo │ └── functions │ └── foo.mcfunction ├── logo.png ├── mecha ├── __init__.py ├── __main__.py ├── api.py ├── ast.py ├── cli.py ├── commands.py ├── config.py ├── contrib │ ├── __init__.py │ ├── annotate_diagnostics.py │ ├── bake_macros.py │ ├── clear_diagnostics.py │ ├── debug_ast.py │ ├── embed.py │ ├── implicit_execute.py │ ├── inline_function_tag.py │ ├── json_files.py │ ├── lint_basic.py │ ├── messages.py │ ├── nested_location.py │ ├── nested_resources.py │ ├── nested_yaml.py │ ├── nesting.py │ ├── raw.py │ ├── relative_location.py │ ├── source_map.py │ ├── statistics.py │ └── validation │ │ ├── __init__.py │ │ └── mcdoc.py ├── database.py ├── diagnostic.py ├── dispatch.py ├── error.py ├── parse.py ├── plugin.py ├── preprocess.py ├── prototype.py ├── py.typed ├── resources │ ├── 1_16.json │ ├── 1_17.json │ ├── 1_18.json │ ├── 1_19.json │ ├── 1_20.json │ ├── 1_21.json │ ├── __init__.py │ ├── inline_function_tag.json │ ├── nesting.json │ └── patches.json ├── serialize.py ├── spec.py └── utils.py ├── package-lock.json ├── package.json ├── poetry.lock ├── pyproject.toml ├── setup.py ├── tests ├── __init__.py ├── conftest.py ├── resources │ ├── SmithedCore-DP-0.0.1.zip │ ├── argument_examples.json │ ├── command_examples.mcfunction │ ├── mcdoc_examples.txt │ └── multiline_command_examples.mcfunction ├── snapshots │ ├── examples__build_basic_1_18__0.pack.md │ ├── examples__build_basic_1_20__0.pack.md │ ├── examples__build_basic__0.pack.md │ ├── examples__build_basic_backslash_continuation__0.pack.md │ ├── examples__build_basic_bake_macros__0.pack.md │ ├── examples__build_basic_debug__0.pack.md │ ├── examples__build_basic_embed__0.pack.md │ ├── examples__build_basic_formatting__0.pack.md │ ├── examples__build_basic_implicit_execute__0.pack.md │ ├── examples__build_basic_json__0.pack.md │ ├── examples__build_basic_lint__0.pack.md │ ├── examples__build_basic_macro_line__0.pack.md │ ├── examples__build_basic_messages__0.pack.md │ ├── examples__build_basic_multiline__0.pack.md │ ├── examples__build_basic_nested_location__0.pack.md │ ├── examples__build_basic_nested_resources__0.pack.md │ ├── examples__build_basic_nested_test__0.pack.md │ ├── examples__build_basic_nested_yaml__0.pack.md │ ├── examples__build_basic_nesting__0.pack.md │ ├── examples__build_basic_overlay__0.pack.md │ ├── examples__build_basic_overlay_composite__0.pack.md │ ├── examples__build_basic_preserve__0.pack.md │ ├── examples__build_basic_raw__0.pack.md │ ├── examples__build_basic_readonly__0.pack.md │ ├── examples__build_basic_relative_location__0.pack.md │ ├── examples__build_basic_source_map__0.pack.md │ ├── examples__build_basic_stats__0.pack.md │ ├── examples__build_custom_command__0.pack.md │ ├── examples__build_custom_execute_destination__0.pack.md │ ├── examples__build_gather_objectives__0.pack.md │ ├── examples__build_kitchen_sink__0.pack.md │ ├── examples__build_load_command_tree__0.pack.md │ ├── mcdoc__parse_0__0.txt │ ├── mcdoc__parse_10__0.txt │ ├── mcdoc__parse_11__0.txt │ ├── mcdoc__parse_12__0.txt │ ├── mcdoc__parse_13__0.txt │ ├── mcdoc__parse_14__0.txt │ ├── mcdoc__parse_15__0.txt │ ├── mcdoc__parse_16__0.txt │ ├── mcdoc__parse_17__0.txt │ ├── mcdoc__parse_1__0.txt │ ├── mcdoc__parse_2__0.txt │ ├── mcdoc__parse_3__0.txt │ ├── mcdoc__parse_4__0.txt │ ├── mcdoc__parse_5__0.txt │ ├── mcdoc__parse_6__0.txt │ ├── mcdoc__parse_7__0.txt │ ├── mcdoc__parse_8__0.txt │ ├── mcdoc__parse_9__0.txt │ ├── parse__argument_examples_brigadier_bool_0_0__0.txt │ ├── parse__argument_examples_brigadier_bool_0_1__0.txt │ ├── parse__argument_examples_brigadier_bool_1_0__0.txt │ ├── parse__argument_examples_brigadier_bool_1_1__0.txt │ ├── parse__argument_examples_brigadier_double_0_0__0.txt │ ├── parse__argument_examples_brigadier_double_0_1__0.txt │ ├── parse__argument_examples_brigadier_double_0_2__0.txt │ ├── parse__argument_examples_brigadier_double_0_3__0.txt │ ├── parse__argument_examples_brigadier_double_0_4__0.txt │ ├── parse__argument_examples_brigadier_double_0_5__0.txt │ ├── parse__argument_examples_brigadier_double_1_0__0.txt │ ├── parse__argument_examples_brigadier_double_1_1__0.txt │ ├── parse__argument_examples_brigadier_double_1_2__0.txt │ ├── parse__argument_examples_brigadier_double_1_3__0.txt │ ├── parse__argument_examples_brigadier_float_0_0__0.txt │ ├── parse__argument_examples_brigadier_float_0_1__0.txt │ ├── parse__argument_examples_brigadier_float_0_2__0.txt │ ├── parse__argument_examples_brigadier_float_0_3__0.txt │ ├── parse__argument_examples_brigadier_float_0_4__0.txt │ ├── parse__argument_examples_brigadier_float_0_5__0.txt │ ├── parse__argument_examples_brigadier_float_1_0__0.txt │ ├── parse__argument_examples_brigadier_float_1_1__0.txt │ ├── parse__argument_examples_brigadier_float_1_2__0.txt │ ├── parse__argument_examples_brigadier_float_1_3__0.txt │ ├── parse__argument_examples_brigadier_integer_0_0__0.txt │ ├── parse__argument_examples_brigadier_integer_0_1__0.txt │ ├── parse__argument_examples_brigadier_integer_0_2__0.txt │ ├── parse__argument_examples_brigadier_integer_1_0__0.txt │ ├── parse__argument_examples_brigadier_integer_1_1__0.txt │ ├── parse__argument_examples_brigadier_integer_1_2__0.txt │ ├── parse__argument_examples_brigadier_integer_1_3__0.txt │ ├── parse__argument_examples_brigadier_integer_1_4__0.txt │ ├── parse__argument_examples_brigadier_long_0_0__0.txt │ ├── parse__argument_examples_brigadier_long_0_1__0.txt │ ├── parse__argument_examples_brigadier_long_0_2__0.txt │ ├── parse__argument_examples_brigadier_long_1_0__0.txt │ ├── parse__argument_examples_brigadier_long_1_1__0.txt │ ├── parse__argument_examples_brigadier_long_1_2__0.txt │ ├── parse__argument_examples_brigadier_long_1_3__0.txt │ ├── parse__argument_examples_brigadier_string_0_0__0.txt │ ├── parse__argument_examples_brigadier_string_0_1__0.txt │ ├── parse__argument_examples_brigadier_string_1_0__0.txt │ ├── parse__argument_examples_brigadier_string_1_1__0.txt │ ├── parse__argument_examples_brigadier_string_1_2__0.txt │ ├── parse__argument_examples_brigadier_string_2_0__0.txt │ ├── parse__argument_examples_brigadier_string_2_1__0.txt │ ├── parse__argument_examples_brigadier_string_2_2__0.txt │ ├── parse__argument_examples_minecraft_angle_0_0__0.txt │ ├── parse__argument_examples_minecraft_angle_0_1__0.txt │ ├── parse__argument_examples_minecraft_angle_0_2__0.txt │ ├── parse__argument_examples_minecraft_angle_1_0__0.txt │ ├── parse__argument_examples_minecraft_angle_1_1__0.txt │ ├── parse__argument_examples_minecraft_block_pos_0_0__0.txt │ ├── parse__argument_examples_minecraft_block_pos_0_1__0.txt │ ├── parse__argument_examples_minecraft_block_pos_0_2__0.txt │ ├── parse__argument_examples_minecraft_block_pos_0_3__0.txt │ ├── parse__argument_examples_minecraft_block_pos_0_4__0.txt │ ├── parse__argument_examples_minecraft_block_pos_1_0__0.txt │ ├── parse__argument_examples_minecraft_block_pos_1_1__0.txt │ ├── parse__argument_examples_minecraft_block_pos_1_2__0.txt │ ├── parse__argument_examples_minecraft_block_pos_1_3__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_0_0__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_0_1__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_0_2__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_0_3__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_0_4__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_1_0__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_1_1__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_1_2__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_1_3__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_1_4__0.txt │ ├── parse__argument_examples_minecraft_block_predicate_1_5__0.txt │ ├── parse__argument_examples_minecraft_block_state_0_0__0.txt │ ├── parse__argument_examples_minecraft_block_state_0_1__0.txt │ ├── parse__argument_examples_minecraft_block_state_0_2__0.txt │ ├── parse__argument_examples_minecraft_block_state_0_3__0.txt │ ├── parse__argument_examples_minecraft_block_state_1_0__0.txt │ ├── parse__argument_examples_minecraft_block_state_1_1__0.txt │ ├── parse__argument_examples_minecraft_block_state_1_2__0.txt │ ├── parse__argument_examples_minecraft_block_state_1_3__0.txt │ ├── parse__argument_examples_minecraft_block_state_1_4__0.txt │ ├── parse__argument_examples_minecraft_block_state_1_5__0.txt │ ├── parse__argument_examples_minecraft_block_state_1_6__0.txt │ ├── parse__argument_examples_minecraft_color_0_0__0.txt │ ├── parse__argument_examples_minecraft_color_0_1__0.txt │ ├── parse__argument_examples_minecraft_color_1_0__0.txt │ ├── parse__argument_examples_minecraft_column_pos_0_0__0.txt │ ├── parse__argument_examples_minecraft_column_pos_0_1__0.txt │ ├── parse__argument_examples_minecraft_column_pos_0_2__0.txt │ ├── parse__argument_examples_minecraft_column_pos_1_0__0.txt │ ├── parse__argument_examples_minecraft_column_pos_1_1__0.txt │ ├── parse__argument_examples_minecraft_column_pos_1_2__0.txt │ ├── parse__argument_examples_minecraft_component_0_0__0.txt │ ├── parse__argument_examples_minecraft_component_0_1__0.txt │ ├── parse__argument_examples_minecraft_component_0_2__0.txt │ ├── parse__argument_examples_minecraft_component_0_3__0.txt │ ├── parse__argument_examples_minecraft_component_0_4__0.txt │ ├── parse__argument_examples_minecraft_component_0_5__0.txt │ ├── parse__argument_examples_minecraft_component_0_6__0.txt │ ├── parse__argument_examples_minecraft_component_1_0__0.txt │ ├── parse__argument_examples_minecraft_dimension_0_0__0.txt │ ├── parse__argument_examples_minecraft_dimension_0_1__0.txt │ ├── parse__argument_examples_minecraft_dimension_1_0__0.txt │ ├── parse__argument_examples_minecraft_entity_0_0__0.txt │ ├── parse__argument_examples_minecraft_entity_0_10__0.txt │ ├── parse__argument_examples_minecraft_entity_0_11__0.txt │ ├── parse__argument_examples_minecraft_entity_0_12__0.txt │ ├── parse__argument_examples_minecraft_entity_0_13__0.txt │ ├── parse__argument_examples_minecraft_entity_0_14__0.txt │ ├── parse__argument_examples_minecraft_entity_0_15__0.txt │ ├── parse__argument_examples_minecraft_entity_0_16__0.txt │ ├── parse__argument_examples_minecraft_entity_0_17__0.txt │ ├── parse__argument_examples_minecraft_entity_0_18__0.txt │ ├── parse__argument_examples_minecraft_entity_0_1__0.txt │ ├── parse__argument_examples_minecraft_entity_0_2__0.txt │ ├── parse__argument_examples_minecraft_entity_0_3__0.txt │ ├── parse__argument_examples_minecraft_entity_0_4__0.txt │ ├── parse__argument_examples_minecraft_entity_0_5__0.txt │ ├── parse__argument_examples_minecraft_entity_0_6__0.txt │ ├── parse__argument_examples_minecraft_entity_0_7__0.txt │ ├── parse__argument_examples_minecraft_entity_0_8__0.txt │ ├── parse__argument_examples_minecraft_entity_0_9__0.txt │ ├── parse__argument_examples_minecraft_entity_1_0__0.txt │ ├── parse__argument_examples_minecraft_entity_1_1__0.txt │ ├── parse__argument_examples_minecraft_entity_2_0__0.txt │ ├── parse__argument_examples_minecraft_entity_2_1__0.txt │ ├── parse__argument_examples_minecraft_entity_2_2__0.txt │ ├── parse__argument_examples_minecraft_entity_3_0__0.txt │ ├── parse__argument_examples_minecraft_entity_3_1__0.txt │ ├── parse__argument_examples_minecraft_entity_4_0__0.txt │ ├── parse__argument_examples_minecraft_entity_4_1__0.txt │ ├── parse__argument_examples_minecraft_entity_5_0__0.txt │ ├── parse__argument_examples_minecraft_entity_5_1__0.txt │ ├── parse__argument_examples_minecraft_entity_5_2__0.txt │ ├── parse__argument_examples_minecraft_entity_5_3__0.txt │ ├── parse__argument_examples_minecraft_entity_anchor_0_0__0.txt │ ├── parse__argument_examples_minecraft_entity_anchor_0_1__0.txt │ ├── parse__argument_examples_minecraft_entity_summon_0_0__0.txt │ ├── parse__argument_examples_minecraft_entity_summon_0_1__0.txt │ ├── parse__argument_examples_minecraft_entity_summon_1_0__0.txt │ ├── parse__argument_examples_minecraft_entity_summon_1_1__0.txt │ ├── parse__argument_examples_minecraft_float_range_0_0__0.txt │ ├── parse__argument_examples_minecraft_float_range_0_1__0.txt │ ├── parse__argument_examples_minecraft_float_range_0_2__0.txt │ ├── parse__argument_examples_minecraft_float_range_0_3__0.txt │ ├── parse__argument_examples_minecraft_float_range_0_4__0.txt │ ├── parse__argument_examples_minecraft_float_range_1_0__0.txt │ ├── parse__argument_examples_minecraft_float_range_1_1__0.txt │ ├── parse__argument_examples_minecraft_function_0_0__0.txt │ ├── parse__argument_examples_minecraft_function_0_1__0.txt │ ├── parse__argument_examples_minecraft_function_0_2__0.txt │ ├── parse__argument_examples_minecraft_game_profile_0_0__0.txt │ ├── parse__argument_examples_minecraft_game_profile_0_1__0.txt │ ├── parse__argument_examples_minecraft_game_profile_0_2__0.txt │ ├── parse__argument_examples_minecraft_game_profile_0_3__0.txt │ ├── parse__argument_examples_minecraft_game_profile_0_4__0.txt │ ├── parse__argument_examples_minecraft_game_profile_1_0__0.txt │ ├── parse__argument_examples_minecraft_game_profile_1_1__0.txt │ ├── parse__argument_examples_minecraft_game_profile_1_2__0.txt │ ├── parse__argument_examples_minecraft_heightmap_0_0__0.txt │ ├── parse__argument_examples_minecraft_heightmap_0_1__0.txt │ ├── parse__argument_examples_minecraft_heightmap_0_2__0.txt │ ├── parse__argument_examples_minecraft_heightmap_0_3__0.txt │ ├── parse__argument_examples_minecraft_heightmap_1_0__0.txt │ ├── parse__argument_examples_minecraft_int_range_0_0__0.txt │ ├── parse__argument_examples_minecraft_int_range_0_1__0.txt │ ├── parse__argument_examples_minecraft_int_range_0_2__0.txt │ ├── parse__argument_examples_minecraft_int_range_0_3__0.txt │ ├── parse__argument_examples_minecraft_int_range_0_4__0.txt │ ├── parse__argument_examples_minecraft_int_range_0_5__0.txt │ ├── parse__argument_examples_minecraft_int_range_0_6__0.txt │ ├── parse__argument_examples_minecraft_int_range_1_0__0.txt │ ├── parse__argument_examples_minecraft_int_range_1_1__0.txt │ ├── parse__argument_examples_minecraft_int_range_1_2__0.txt │ ├── parse__argument_examples_minecraft_int_range_1_3__0.txt │ ├── parse__argument_examples_minecraft_int_range_1_4__0.txt │ ├── parse__argument_examples_minecraft_item_enchantment_0_0__0.txt │ ├── parse__argument_examples_minecraft_item_enchantment_0_1__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_0__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_10__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_11__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_1__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_2__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_3__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_4__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_5__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_6__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_7__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_8__0.txt │ ├── parse__argument_examples_minecraft_item_predicate_0_9__0.txt │ ├── parse__argument_examples_minecraft_item_slot_0_0__0.txt │ ├── parse__argument_examples_minecraft_item_slot_0_1__0.txt │ ├── parse__argument_examples_minecraft_item_slot_0_2__0.txt │ ├── parse__argument_examples_minecraft_item_slot_1_0__0.txt │ ├── parse__argument_examples_minecraft_item_slot_1_1__0.txt │ ├── parse__argument_examples_minecraft_item_stack_0_0__0.txt │ ├── parse__argument_examples_minecraft_item_stack_0_1__0.txt │ ├── parse__argument_examples_minecraft_item_stack_0_2__0.txt │ ├── parse__argument_examples_minecraft_item_stack_0_3__0.txt │ ├── parse__argument_examples_minecraft_item_stack_1_0__0.txt │ ├── parse__argument_examples_minecraft_item_stack_1_1__0.txt │ ├── parse__argument_examples_minecraft_item_stack_1_2__0.txt │ ├── parse__argument_examples_minecraft_loot_predicate_0_0__0.txt │ ├── parse__argument_examples_minecraft_loot_predicate_0_1__0.txt │ ├── parse__argument_examples_minecraft_message_0_0__0.txt │ ├── parse__argument_examples_minecraft_message_0_1__0.txt │ ├── parse__argument_examples_minecraft_message_0_2__0.txt │ ├── parse__argument_examples_minecraft_message_0_3__0.txt │ ├── parse__argument_examples_minecraft_message_0_4__0.txt │ ├── parse__argument_examples_minecraft_message_1_0__0.txt │ ├── parse__argument_examples_minecraft_mob_effect_0_0__0.txt │ ├── parse__argument_examples_minecraft_mob_effect_0_1__0.txt │ ├── parse__argument_examples_minecraft_nbt_compound_tag_0_0__0.txt │ ├── parse__argument_examples_minecraft_nbt_compound_tag_0_1__0.txt │ ├── parse__argument_examples_minecraft_nbt_compound_tag_1_0__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_0__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_10__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_11__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_12__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_13__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_14__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_15__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_16__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_17__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_1__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_2__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_3__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_4__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_5__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_6__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_7__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_8__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_0_9__0.txt │ ├── parse__argument_examples_minecraft_nbt_path_1_0__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_0__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_10__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_11__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_12__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_13__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_14__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_1__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_2__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_3__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_4__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_5__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_6__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_7__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_8__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_0_9__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_0__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_10__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_11__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_12__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_13__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_1__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_2__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_3__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_4__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_5__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_6__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_7__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_8__0.txt │ ├── parse__argument_examples_minecraft_nbt_tag_1_9__0.txt │ ├── parse__argument_examples_minecraft_objective_0_0__0.txt │ ├── parse__argument_examples_minecraft_objective_0_1__0.txt │ ├── parse__argument_examples_minecraft_objective_0_2__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_0__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_1__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_2__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_3__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_4__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_5__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_6__0.txt │ ├── parse__argument_examples_minecraft_objective_criteria_0_7__0.txt │ ├── parse__argument_examples_minecraft_operation_0_0__0.txt │ ├── parse__argument_examples_minecraft_operation_0_1__0.txt │ ├── parse__argument_examples_minecraft_operation_0_2__0.txt │ ├── parse__argument_examples_minecraft_operation_1_0__0.txt │ ├── parse__argument_examples_minecraft_particle_0_0__0.txt │ ├── parse__argument_examples_minecraft_particle_0_10__0.txt │ ├── parse__argument_examples_minecraft_particle_0_11__0.txt │ ├── parse__argument_examples_minecraft_particle_0_12__0.txt │ ├── parse__argument_examples_minecraft_particle_0_1__0.txt │ ├── parse__argument_examples_minecraft_particle_0_2__0.txt │ ├── parse__argument_examples_minecraft_particle_0_3__0.txt │ ├── parse__argument_examples_minecraft_particle_0_4__0.txt │ ├── parse__argument_examples_minecraft_particle_0_5__0.txt │ ├── parse__argument_examples_minecraft_particle_0_6__0.txt │ ├── parse__argument_examples_minecraft_particle_0_7__0.txt │ ├── parse__argument_examples_minecraft_particle_0_8__0.txt │ ├── parse__argument_examples_minecraft_particle_0_9__0.txt │ ├── parse__argument_examples_minecraft_particle_1_0__0.txt │ ├── parse__argument_examples_minecraft_particle_1_1__0.txt │ ├── parse__argument_examples_minecraft_particle_1_2__0.txt │ ├── parse__argument_examples_minecraft_particle_1_3__0.txt │ ├── parse__argument_examples_minecraft_particle_1_4__0.txt │ ├── parse__argument_examples_minecraft_particle_1_5__0.txt │ ├── parse__argument_examples_minecraft_particle_1_6__0.txt │ ├── parse__argument_examples_minecraft_particle_1_7__0.txt │ ├── parse__argument_examples_minecraft_particle_1_8__0.txt │ ├── parse__argument_examples_minecraft_resource_location_0_0__0.txt │ ├── parse__argument_examples_minecraft_resource_location_0_1__0.txt │ ├── parse__argument_examples_minecraft_resource_location_0_2__0.txt │ ├── parse__argument_examples_minecraft_resource_location_1_0__0.txt │ ├── parse__argument_examples_minecraft_rotation_0_0__0.txt │ ├── parse__argument_examples_minecraft_rotation_0_1__0.txt │ ├── parse__argument_examples_minecraft_rotation_0_2__0.txt │ ├── parse__argument_examples_minecraft_rotation_1_0__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_0__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_10__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_11__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_12__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_13__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_14__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_15__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_16__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_17__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_18__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_19__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_1__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_20__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_21__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_22__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_23__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_24__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_25__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_2__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_3__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_4__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_5__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_6__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_7__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_8__0.txt │ ├── parse__argument_examples_minecraft_score_holder_0_9__0.txt │ ├── parse__argument_examples_minecraft_score_holder_1_0__0.txt │ ├── parse__argument_examples_minecraft_score_holder_1_1__0.txt │ ├── parse__argument_examples_minecraft_score_holder_1_2__0.txt │ ├── parse__argument_examples_minecraft_score_holder_2_0__0.txt │ ├── parse__argument_examples_minecraft_score_holder_2_1__0.txt │ ├── parse__argument_examples_minecraft_score_holder_2_2__0.txt │ ├── parse__argument_examples_minecraft_score_holder_2_3__0.txt │ ├── parse__argument_examples_minecraft_score_holder_2_4__0.txt │ ├── parse__argument_examples_minecraft_score_holder_2_5__0.txt │ ├── parse__argument_examples_minecraft_score_holder_2_6__0.txt │ ├── parse__argument_examples_minecraft_scoreboard_slot_0_0__0.txt │ ├── parse__argument_examples_minecraft_scoreboard_slot_0_1__0.txt │ ├── parse__argument_examples_minecraft_scoreboard_slot_0_2__0.txt │ ├── parse__argument_examples_minecraft_scoreboard_slot_0_3__0.txt │ ├── parse__argument_examples_minecraft_scoreboard_slot_1_0__0.txt │ ├── parse__argument_examples_minecraft_scoreboard_slot_1_1__0.txt │ ├── parse__argument_examples_minecraft_swizzle_0_0__0.txt │ ├── parse__argument_examples_minecraft_swizzle_0_1__0.txt │ ├── parse__argument_examples_minecraft_swizzle_1_0__0.txt │ ├── parse__argument_examples_minecraft_swizzle_1_1__0.txt │ ├── parse__argument_examples_minecraft_swizzle_1_2__0.txt │ ├── parse__argument_examples_minecraft_swizzle_1_3__0.txt │ ├── parse__argument_examples_minecraft_team_0_0__0.txt │ ├── parse__argument_examples_minecraft_team_0_1__0.txt │ ├── parse__argument_examples_minecraft_template_mirror_0_0__0.txt │ ├── parse__argument_examples_minecraft_template_mirror_0_1__0.txt │ ├── parse__argument_examples_minecraft_template_mirror_0_2__0.txt │ ├── parse__argument_examples_minecraft_template_rotation_0_0__0.txt │ ├── parse__argument_examples_minecraft_template_rotation_0_1__0.txt │ ├── parse__argument_examples_minecraft_template_rotation_0_2__0.txt │ ├── parse__argument_examples_minecraft_template_rotation_0_3__0.txt │ ├── parse__argument_examples_minecraft_time_0_0__0.txt │ ├── parse__argument_examples_minecraft_time_0_1__0.txt │ ├── parse__argument_examples_minecraft_time_0_2__0.txt │ ├── parse__argument_examples_minecraft_time_0_3__0.txt │ ├── parse__argument_examples_minecraft_uuid_0_0__0.txt │ ├── parse__argument_examples_minecraft_uuid_0_1__0.txt │ ├── parse__argument_examples_minecraft_vec2_0_0__0.txt │ ├── parse__argument_examples_minecraft_vec2_0_1__0.txt │ ├── parse__argument_examples_minecraft_vec2_0_2__0.txt │ ├── parse__argument_examples_minecraft_vec2_0_3__0.txt │ ├── parse__argument_examples_minecraft_vec3_0_0__0.txt │ ├── parse__argument_examples_minecraft_vec3_0_1__0.txt │ ├── parse__argument_examples_minecraft_vec3_0_2__0.txt │ ├── parse__argument_examples_minecraft_vec3_0_3__0.txt │ ├── parse__argument_examples_minecraft_vec3_0_4__0.txt │ ├── parse__argument_examples_minecraft_vec3_0_5__0.txt │ ├── parse__command_examples__0.txt │ ├── parse__command_examples__1.txt │ ├── parse__multiline__0.txt │ ├── parse__multiline__1.txt │ ├── parse__multiline_command_examples__0.txt │ ├── parse__multiline_command_examples__1.txt │ ├── parse__say__0.txt │ ├── parse__say__1.txt │ ├── parse__say__2.txt │ ├── parse__say__3.txt │ ├── spec__prototypes__0.json │ └── stats__smithed_core__0.txt ├── test_compile.py ├── test_dispatch.py ├── test_examples.py ├── test_mcdoc.py ├── test_parse.py ├── test_spec.py └── test_stats.py └── typings └── nbtlib.py /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: 2 | - vberlier 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | updates: 4 | - package-ecosystem: "npm" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | 9 | - package-ecosystem: "pip" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" 13 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-python.python", 4 | "ms-python.vscode-pylance", 5 | "ms-python.black-formatter", 6 | "tamasfe.even-better-toml" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.formatting.provider": "none", 3 | "python.languageServer": "Pylance", 4 | "python.linting.enabled": false, 5 | "python.linting.pylintEnabled": false, 6 | "python.linting.banditEnabled": false, 7 | "python.linting.flake8Enabled": false, 8 | "python.linting.mypyEnabled": false, 9 | "python.linting.prospectorEnabled": false, 10 | "python.linting.pycodestyleEnabled": false, 11 | "python.linting.pydocstyleEnabled": false, 12 | "python.linting.pylamaEnabled": false, 13 | "[python]": { 14 | "editor.tabSize": 4, 15 | "editor.formatOnSave": true, 16 | "editor.formatOnType": false, 17 | "editor.formatOnPaste": false, 18 | "editor.codeActionsOnSave": { 19 | "source.organizeImports": "explicit" 20 | }, 21 | "editor.defaultFormatter": "ms-python.black-formatter" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/basic/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: [src] 3 | pipeline: 4 | - mecha 5 | -------------------------------------------------------------------------------- /examples/basic/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | # Comments and extra newlines are stripped out 2 | say hello 3 | 4 | 5 | say world 6 | -------------------------------------------------------------------------------- /examples/basic_1_18/beet.yml: -------------------------------------------------------------------------------- 1 | minecraft: 1.18 2 | data_pack: 3 | load: "src" 4 | pipeline: 5 | - mecha 6 | -------------------------------------------------------------------------------- /examples/basic_1_18/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | locate endcity 2 | scoreboard objectives setdisplay belowName foo 3 | -------------------------------------------------------------------------------- /examples/basic_1_20/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: "src" 3 | pipeline: 4 | - mecha 5 | -------------------------------------------------------------------------------- /examples/basic_1_20/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | execute if entity @e[type=pig] run return 1 2 | return 0 3 | -------------------------------------------------------------------------------- /examples/basic_backslash_continuation/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: "src" 3 | pipeline: 4 | - mecha 5 | -------------------------------------------------------------------------------- /examples/basic_backslash_continuation/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | # without multiline mode 2 | execute \ 3 | as @a[ \ 4 | tag=blob \ 5 | ] \ 6 | run \ 7 | function demo:foo 8 | s\ 9 | a\ 10 | y \ 11 | h\ 12 | e\ 13 | l\ 14 | l\ 15 | o 16 | -------------------------------------------------------------------------------- /examples/basic_bake_macros/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.nesting 3 | - mecha.contrib.bake_macros 4 | data_pack: 5 | load: "src" 6 | pipeline: 7 | - mecha 8 | -------------------------------------------------------------------------------- /examples/basic_bake_macros/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | execute as @p at @s run function demo:beep {name: "steve", offset: 1.3f}: 2 | execute positioned ~ ~1 ~ run summon creeper 3 | $say hello $(name) 4 | $execute as @a[name=$(name)] run say something 5 | $execute positioned ~ ~$(offset) ~ run function demo:bop {name: "$(name)"} 6 | 7 | function demo:bop: 8 | $say bye $(name) 9 | -------------------------------------------------------------------------------- /examples/basic_debug/beet-location.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.debug_ast 3 | data_pack: 4 | load: 5 | data/demo/functions/bar.mcfunction: "src/data/demo/functions/foo.mcfunction" 6 | pipeline: 7 | - mecha 8 | meta: 9 | debug_ast: 10 | location: true 11 | -------------------------------------------------------------------------------- /examples/basic_debug/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.debug_ast 3 | data_pack: 4 | load: "src" 5 | pipeline: 6 | - mecha 7 | - extend: "beet-location.yml" 8 | -------------------------------------------------------------------------------- /examples/basic_debug/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | say hello 2 | -------------------------------------------------------------------------------- /examples/basic_embed/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.embed 3 | - mecha.contrib.json_files 4 | - mecha.contrib.nested_resources 5 | - demo 6 | data_pack: 7 | load: "src" 8 | pipeline: 9 | - mecha 10 | -------------------------------------------------------------------------------- /examples/basic_embed/src/data/demo/loot_tables/foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "pools": [ 3 | { 4 | "rolls": 1, 5 | "entries": [ 6 | { 7 | "type": "item", 8 | "name": "minecraft:diamond", 9 | "functions": [ 10 | { 11 | "function": "minecraft:set_nbt", 12 | "tag": "{custom: {value: '$PLACEHOLDER'}}" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /examples/basic_formatting/foo.mcfunction: -------------------------------------------------------------------------------- 1 | say this is a test 2 | 3 | # Random stuff 4 | execute 5 | as @a[nbt={SelectedItem: {id: "minecraft:diamond", Count: 64b}}] 6 | at @s # This is important 7 | run setblock ~ ~ ~ repeater[delay=3, facing=south] 8 | 9 | tellraw @a ["", 10 | {"text": "hello", "color": "red"}, 11 | "not ascii: ¶", 12 | ] 13 | 14 | say goodbye 15 | -------------------------------------------------------------------------------- /examples/basic_implicit_execute/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.implicit_execute 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | -------------------------------------------------------------------------------- /examples/basic_implicit_execute/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | execute if score @p tmp matches 1 run say hello 2 | execute as @a at @s run setblock ~ ~ ~ stone 3 | execute if score @p tmp matches 1 say hello 4 | execute as @a at @s setblock ~ ~ ~ stone 5 | if score @p tmp matches 1 run say hello 6 | as @a at @s run setblock ~ ~ ~ stone 7 | if score @p tmp matches 1 say hello 8 | as @a at @s setblock ~ ~ ~ stone 9 | 10 | execute store result score PLAYER_COUNT global if entity @a 11 | store result score PLAYER_COUNT global if entity @a 12 | 13 | summon pig 14 | summon pig ~ ~ ~ {Fire:120s} 15 | execute summon pig data merge entity @s {Fire:120s} 16 | execute summon pig: 17 | data merge entity @s {Fire:120s} 18 | 19 | at @a run summon pig 20 | at @a run summon pig ~ ~ ~ {Fire:120s} 21 | at @a summon pig data merge entity @s {Fire:120s} 22 | at @a summon pig: 23 | data merge entity @s {Fire:120s} 24 | -------------------------------------------------------------------------------- /examples/basic_json/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.json_files 3 | - mecha.contrib.nested_resources 4 | - demo 5 | data_pack: 6 | load: "src" 7 | pipeline: 8 | - mecha 9 | -------------------------------------------------------------------------------- /examples/basic_json/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @p {"text": "empty"} 2 | loot_table demo:bar {"pools": "empty"} 3 | -------------------------------------------------------------------------------- /examples/basic_json/src/data/demo/loot_tables/foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "pools": "empty" 3 | } 4 | -------------------------------------------------------------------------------- /examples/basic_lint/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.lint_basic 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | - mecha.contrib.annotate_diagnostics 8 | - mecha.contrib.clear_diagnostics 9 | meta: 10 | mecha: 11 | readonly: true 12 | -------------------------------------------------------------------------------- /examples/basic_lint/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | say hello 2 | 3 | execute run say hello @p[scores={tmp=1},gamemode=adventure] 4 | 5 | execute in the_end run execute at @a run setblock ~ ~ ~ lava 6 | -------------------------------------------------------------------------------- /examples/basic_macro_line/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: "src" 3 | pipeline: 4 | - mecha 5 | -------------------------------------------------------------------------------- /examples/basic_macro_line/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | function demo:thing {name: "steve", eval: "kill @a"} 2 | -------------------------------------------------------------------------------- /examples/basic_macro_line/src/data/demo/functions/thing.mcfunction: -------------------------------------------------------------------------------- 1 | $say hello $(name) 2 | $ say hell\ 3 | o $\ 4 | (name) 5 | $$(eval) 6 | -------------------------------------------------------------------------------- /examples/basic_messages/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.messages 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | -------------------------------------------------------------------------------- /examples/basic_messages/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @a from demo:greeting 2 | -------------------------------------------------------------------------------- /examples/basic_messages/src/data/demo/messages/greeting.json: -------------------------------------------------------------------------------- 1 | { 2 | "text": "hello", 3 | "color": "red" 4 | } 5 | -------------------------------------------------------------------------------- /examples/basic_multiline/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: [src] 3 | pipeline: 4 | - mecha 5 | meta: 6 | mecha: 7 | multiline: true 8 | -------------------------------------------------------------------------------- /examples/basic_multiline/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | execute 2 | as @a # For each "player", 3 | at @s # start at their feet. 4 | anchored eyes # Looking through their eyes, 5 | facing 0 0 0 # face perfectly at the target 6 | anchored feet # (go back to the feet) 7 | positioned ^ ^ ^1 # and move one block forward. 8 | rotated as @s # Face the direction the player 9 | # is actually facing, 10 | positioned ^ ^ ^-1 # and move one block back. 11 | if entity @s[distance=..0.6] # Check if we're close to the 12 | # player's feet. 13 | run 14 | say I'm facing the target! 15 | -------------------------------------------------------------------------------- /examples/basic_nested_location/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.relative_location 3 | - mecha.contrib.nested_location 4 | data_pack: 5 | load: "src" 6 | pipeline: 7 | - mecha 8 | -------------------------------------------------------------------------------- /examples/basic_nested_location/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | function ~/ 2 | function ~/thing 3 | function ~/../thing 4 | 5 | function demo:bar: 6 | function ~/ 7 | function ~/thing 8 | function ~/../thing 9 | 10 | append function ~/thing: 11 | function #~/aaa 12 | 13 | function ./wat: 14 | function ~/ 15 | function ~/thing 16 | function ~/../thing 17 | 18 | append function ~/thing: 19 | function #~/bbb 20 | 21 | function ~/this: 22 | function ~/ 23 | function ~/thing 24 | function ~/../thing 25 | 26 | append function ~/thing: 27 | function #~/ccc 28 | 29 | function ~/../upthis: 30 | function ~/ 31 | function ~/thing 32 | function ~/../thing 33 | 34 | append function ~/thing: 35 | function #~/ddd 36 | 37 | execute if function ~/condition run function ~/action 38 | -------------------------------------------------------------------------------- /examples/basic_nested_resources/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - beet.contrib.model_merging 3 | - mecha.contrib.nesting 4 | - mecha.contrib.nested_resources 5 | resource_pack: 6 | load: "src" 7 | data_pack: 8 | load: "src" 9 | pipeline: 10 | - mecha 11 | -------------------------------------------------------------------------------- /examples/basic_nested_test/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.nesting 3 | - mecha.contrib.nested_location 4 | - mecha.contrib.implicit_execute 5 | - demo 6 | data_pack: 7 | load: "src" 8 | pipeline: 9 | - mecha 10 | - demo.convert_tests 11 | -------------------------------------------------------------------------------- /examples/basic_nested_test/src/data/demo/functions/stuff.mcfunction: -------------------------------------------------------------------------------- 1 | setblock ~ ~ ~ stone 2 | 3 | test ~/blah: 4 | if block ~ ~ ~ stone say success 5 | 6 | if block ~ ~ ~ stone function ~/remove: 7 | setblock ~ ~ ~ air 8 | 9 | test: 10 | say 1 11 | 12 | test: 13 | say 2 14 | -------------------------------------------------------------------------------- /examples/basic_nested_test/src/data/demo/tests/foo.mcfunction: -------------------------------------------------------------------------------- 1 | as @p say this is a test 2 | -------------------------------------------------------------------------------- /examples/basic_nested_yaml/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.nesting 3 | - mecha.contrib.nested_yaml 4 | data_pack: 5 | load: [src] 6 | pipeline: 7 | - mecha 8 | -------------------------------------------------------------------------------- /examples/basic_nesting/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.nesting 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | -------------------------------------------------------------------------------- /examples/basic_nesting/src/data/demo/functions/wat.mcfunction: -------------------------------------------------------------------------------- 1 | execute: 2 | execute: 3 | 4 | say 1 5 | execute: 6 | say 2 7 | -------------------------------------------------------------------------------- /examples/basic_nesting/src/data/demo/functions/xct.mcfunction: -------------------------------------------------------------------------------- 1 | execute run function demo:xct/inner: 2 | execute as @p: 3 | say hello 4 | say world 5 | 6 | execute at @s: 7 | say foo 8 | say bar 9 | -------------------------------------------------------------------------------- /examples/basic_overlay/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.relative_location 3 | - mecha.contrib.nesting 4 | data_pack: 5 | load: "src" 6 | pipeline: 7 | - mecha 8 | -------------------------------------------------------------------------------- /examples/basic_overlay/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | say hello 2 | execute as @a run function ./stuff: 3 | say a 4 | say b 5 | say c 6 | -------------------------------------------------------------------------------- /examples/basic_overlay/src/dummy_overlay/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | say hello from overlay 2 | execute as @a run function ./stuff: 3 | say 1 4 | say 2 5 | say 3 6 | -------------------------------------------------------------------------------- /examples/basic_overlay_composite/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: 3 | pack.mcmeta: "pack.mcmeta" 4 | pipeline: 5 | - minecraft: "1.19" 6 | data_pack: 7 | load: 8 | old/data/demo/functions/foo.mcfunction: "foo_old.mcfunction" 9 | pipeline: 10 | - mecha 11 | - data_pack: 12 | load: 13 | data/demo/functions/foo.mcfunction: "foo.mcfunction" 14 | pipeline: 15 | - mecha 16 | -------------------------------------------------------------------------------- /examples/basic_overlay_composite/foo.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard objectives add roll_dice dummy 2 | # scoreboard objectives setdisplay belowName roll_dice 3 | execute store result score @s roll_dice run random value 1..6 4 | -------------------------------------------------------------------------------- /examples/basic_overlay_composite/foo_old.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard objectives add roll_dice dummy 2 | scoreboard objectives setdisplay belowName roll_dice 3 | # execute store result score @s roll_dice run random value 1..6 4 | -------------------------------------------------------------------------------- /examples/basic_overlay_composite/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "overlays": { 3 | "entries": [ 4 | { 5 | "formats": 12, 6 | "directory": "old" 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/basic_preserve/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: [src] 3 | pipeline: 4 | - mecha 5 | meta: 6 | mecha: 7 | multiline: true 8 | formatting: preserve 9 | -------------------------------------------------------------------------------- /examples/basic_raw/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.raw 3 | data_pack: 4 | load: "src" 5 | pipeline: 6 | - mecha 7 | -------------------------------------------------------------------------------- /examples/basic_raw/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | raw say something 2 | execute as @a run raw say @s 3 | -------------------------------------------------------------------------------- /examples/basic_readonly/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: [src] 3 | pipeline: 4 | - mecha 5 | meta: 6 | mecha: 7 | readonly: true 8 | -------------------------------------------------------------------------------- /examples/basic_readonly/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | # With the `readonly` option functions are left untouched 2 | say hello 3 | 4 | 5 | say world 6 | -------------------------------------------------------------------------------- /examples/basic_relative_location/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.relative_location 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | -------------------------------------------------------------------------------- /examples/basic_relative_location/src/data/demo/functions/bar.mcfunction: -------------------------------------------------------------------------------- 1 | say hello 2 | -------------------------------------------------------------------------------- /examples/basic_relative_location/src/data/demo/functions/folder/wat.mcfunction: -------------------------------------------------------------------------------- 1 | function ../bar 2 | -------------------------------------------------------------------------------- /examples/basic_relative_location/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | function ./folder/wat 2 | function ./bar 3 | schedule function ./other 1s 4 | schedule clear ./other 5 | -------------------------------------------------------------------------------- /examples/basic_relative_location/src/data/demo/functions/other.mcfunction: -------------------------------------------------------------------------------- 1 | say delayed 2 | -------------------------------------------------------------------------------- /examples/basic_source_map/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.nesting 3 | - mecha.contrib.source_map 4 | data_pack: 5 | load: "src" 6 | pipeline: 7 | - demo 8 | - mecha 9 | -------------------------------------------------------------------------------- /examples/basic_source_map/demo.py: -------------------------------------------------------------------------------- 1 | from beet import Context, Function 2 | 3 | 4 | def beet_default(ctx: Context): 5 | ctx.generate(Function("say 123\nfunction demo:thing:\n say 456\n")) 6 | -------------------------------------------------------------------------------- /examples/basic_source_map/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | say abc 2 | 3 | function demo:bar: 4 | say def 5 | 6 | execute as @p: 7 | say something 8 | 9 | execute as @p: 10 | say foo 11 | say bar 12 | -------------------------------------------------------------------------------- /examples/basic_stats/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.statistics 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | - demo 8 | -------------------------------------------------------------------------------- /examples/basic_stats/demo.py: -------------------------------------------------------------------------------- 1 | from beet import Context 2 | 3 | from mecha import Mecha 4 | from mecha.contrib.statistics import Analyzer, Summary 5 | 6 | 7 | def beet_default(ctx: Context): 8 | mc = ctx.inject(Mecha) 9 | analyzer = ctx.inject(Analyzer) 10 | summary = Summary(mc.spec, analyzer.stats) 11 | header = [f"# {line}" for line in str(summary).splitlines()] 12 | ctx.data.functions["demo:foo"].prepend(header) 13 | -------------------------------------------------------------------------------- /examples/basic_stats/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard objectives add my_consts dummy 2 | scoreboard players set 10 my_consts 10 3 | scoreboard players operation @e[tag=hello,scores={foo=1..}] foo += 10 my_consts 4 | execute if score @s foo matches 20.. as @e[tag=hello] run setblock ~ ~ ~ stone 5 | -------------------------------------------------------------------------------- /examples/custom_command/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - demo 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | -------------------------------------------------------------------------------- /examples/custom_command/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | greet @a[tag=!registered] 2 | execute if score #init temp = #wat temp run greet @a[tag=hi] 3 | -------------------------------------------------------------------------------- /examples/custom_execute_destination/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.nesting 3 | data_pack: 4 | load: "src" 5 | pipeline: 6 | - mecha 7 | meta: 8 | nesting: 9 | generate_execute: generated/{incr:#x} 10 | -------------------------------------------------------------------------------- /examples/custom_execute_destination/src/data/demo/functions/bar.mcfunction: -------------------------------------------------------------------------------- 1 | execute as @a: 2 | say test 3 | say bar 4 | -------------------------------------------------------------------------------- /examples/custom_execute_destination/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | execute as @a: 2 | say test 3 | say foo 4 | function demo:foo/stuff: 5 | execute as @a: 6 | say test 7 | say foo 8 | -------------------------------------------------------------------------------- /examples/gather_objectives/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - demo 3 | data_pack: 4 | load: [src] 5 | pipeline: 6 | - mecha 7 | -------------------------------------------------------------------------------- /examples/gather_objectives/demo.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass, field 2 | from typing import Set 3 | 4 | from beet import Context, Function 5 | 6 | from mecha import AstObjective, Mecha, Reducer, rule 7 | 8 | 9 | @dataclass 10 | class ObjectiveCollector(Reducer): 11 | objectives: Set[str] = field(default_factory=set) 12 | 13 | @rule(AstObjective) 14 | def objective(self, node: AstObjective): 15 | self.objectives.add(node.value) 16 | 17 | 18 | def beet_default(ctx: Context): 19 | mc = ctx.inject(Mecha) 20 | objective_collector = ObjectiveCollector() 21 | mc.check.extend(objective_collector) 22 | yield 23 | ctx.generate(Function([f"say {', '.join(sorted(objective_collector.objectives))}"])) 24 | -------------------------------------------------------------------------------- /examples/gather_objectives/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | scoreboard players set @a foo 1 2 | say @a[scores={thing=..9}] 3 | execute if score @s wat matches 7 run scoreboard players operation @s wat = @p[tag=target,scores={wow=1..},sort=nearest] wow 4 | -------------------------------------------------------------------------------- /examples/kitchen_sink/beet.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - mecha.contrib.inline_function_tag 3 | - mecha.contrib.relative_location 4 | - mecha.contrib.implicit_execute 5 | - mecha.contrib.messages 6 | - mecha.contrib.nesting 7 | data_pack: 8 | load: [src] 9 | pipeline: 10 | - mecha 11 | meta: 12 | mecha: 13 | multiline: true 14 | -------------------------------------------------------------------------------- /examples/kitchen_sink/src/data/demo/functions/function_tag.mcfunction: -------------------------------------------------------------------------------- 1 | function tag minecraft:tick 2 | 3 | say hello 4 | 5 | as @a function ./with_tag: 6 | function tag ./abc 7 | say world 8 | 9 | append function ./with_tag: 10 | function tag ./xyz 11 | 12 | function ./my_load: 13 | function tag load 14 | say loaded 15 | 16 | function ./also_with_tag: 17 | say foo 18 | function tag ./abc 19 | -------------------------------------------------------------------------------- /examples/kitchen_sink/src/data/demo/functions/implicit_execute.mcfunction: -------------------------------------------------------------------------------- 1 | as @a at @s align xyz 2 | run summon armor_stand ~ ~ ~ { 3 | Tags: [ 4 | "position_history", 5 | "new" 6 | ], 7 | Invisible: 1b, 8 | Marker: 1b 9 | } 10 | 11 | if score @s obj matches 2 12 | say hi 13 | -------------------------------------------------------------------------------- /examples/kitchen_sink/src/data/demo/functions/messages.mcfunction: -------------------------------------------------------------------------------- 1 | tellraw @p from ./greet 2 | data modify storage imp:io words set value [alpha, beta, gamma, delta] 3 | -------------------------------------------------------------------------------- /examples/kitchen_sink/src/data/demo/functions/nesting.mcfunction: -------------------------------------------------------------------------------- 1 | as @a at @s: 2 | say hello 3 | say world 4 | 5 | as @a at @s 6 | if score @s tmp matches 1: 7 | say hello 8 | say world 9 | 10 | function ./nesting/foo: 11 | say 12 | this 13 | is 14 | a 15 | test 16 | 17 | as @a at @s expand: 18 | say 1 19 | say 2 20 | 21 | as @a at @s expand: 22 | if score @s tmp matches 1 expand: 23 | say 1 24 | say 2 25 | 26 | 27 | 28 | if data storage imp:temp iter.words.remaining[] function ./nesting/loop: 29 | say wow 30 | if data storage imp:temp iter.words.remaining[] function ./nesting/loop 31 | 32 | 33 | if score @s tmp matches 0: 34 | at @e[type=pig] setblock ~ ~ ~ stone 35 | at @e[type=sheep] setblock ~ ~ ~ dirt 36 | 37 | 38 | if score @s tmp matches 0 39 | at @e[type=pig]: 40 | unless entity @e[type=sheep] 41 | setblock ~ ~ ~ dirt 42 | -------------------------------------------------------------------------------- /examples/kitchen_sink/src/data/demo/messages/greet.json: -------------------------------------------------------------------------------- 1 | { 2 | "text": "hello", 3 | "color": "red" 4 | } 5 | -------------------------------------------------------------------------------- /examples/load_command_tree/beet.yml: -------------------------------------------------------------------------------- 1 | data_pack: 2 | load: "src" 3 | pipeline: 4 | - mecha 5 | meta: 6 | mecha: 7 | commands: 8 | - "@mecha/resources/1_20.json" 9 | - "commands.json" 10 | -------------------------------------------------------------------------------- /examples/load_command_tree/commands.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "root", 3 | "children": { 4 | "this_is_valid_now": { 5 | "type": "literal", 6 | "executable": true 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/load_command_tree/src/data/demo/functions/foo.mcfunction: -------------------------------------------------------------------------------- 1 | say hello 2 | this_is_valid_now 3 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcbeet/mecha/b979a9b747fc8b4893af2d518d7b491cbe96a8ef/logo.png -------------------------------------------------------------------------------- /mecha/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.98.1" 2 | 3 | 4 | from .api import * 5 | from .ast import * 6 | from .config import * 7 | from .database import * 8 | from .diagnostic import * 9 | from .dispatch import * 10 | from .error import * 11 | from .parse import * 12 | from .plugin import * 13 | from .preprocess import * 14 | from .prototype import * 15 | from .resources import * 16 | from .serialize import * 17 | from .spec import * 18 | -------------------------------------------------------------------------------- /mecha/__main__.py: -------------------------------------------------------------------------------- 1 | from mecha.cli import main 2 | 3 | main() 4 | -------------------------------------------------------------------------------- /mecha/commands.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | import click 4 | from beet import ErrorMessage, Project 5 | from beet.toolchain.cli import beet 6 | 7 | from mecha import AstCacheBackend 8 | 9 | pass_project = click.make_pass_decorator(Project) # type: ignore 10 | 11 | 12 | @beet.command() 13 | @pass_project 14 | @click.argument("filename", type=click.Path(exists=True, dir_okay=False)) 15 | def ast(project: Project, filename: str): 16 | """Inspect cached mecha ast.""" 17 | source_path = Path(filename).resolve() 18 | ast_path = project.cache["mecha"].get_path(f"{source_path}-ast") 19 | 20 | try: 21 | with ast_path.open("rb") as f: 22 | click.echo(AstCacheBackend().load(f).dump()) 23 | except Exception as exc: 24 | raise ErrorMessage(f'No cached ast for "{filename}".') from exc 25 | -------------------------------------------------------------------------------- /mecha/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcbeet/mecha/b979a9b747fc8b4893af2d518d7b491cbe96a8ef/mecha/contrib/__init__.py -------------------------------------------------------------------------------- /mecha/contrib/clear_diagnostics.py: -------------------------------------------------------------------------------- 1 | """Plugin that clears diagnostics.""" 2 | 3 | from beet import Context 4 | 5 | from mecha import Mecha 6 | 7 | 8 | def beet_default(ctx: Context): 9 | mc = ctx.inject(Mecha) 10 | mc.diagnostics.clear() 11 | -------------------------------------------------------------------------------- /mecha/contrib/validation/__init__.py: -------------------------------------------------------------------------------- 1 | from .mcdoc import * 2 | -------------------------------------------------------------------------------- /mecha/error.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | "MechaError", 3 | ] 4 | 5 | 6 | class MechaError(Exception): 7 | """Base class for all mecha errors.""" 8 | -------------------------------------------------------------------------------- /mecha/plugin.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | "beet_default", 3 | ] 4 | 5 | 6 | from beet import Context 7 | 8 | from .api import Mecha 9 | 10 | 11 | def beet_default(ctx: Context): 12 | mc = ctx.inject(Mecha) 13 | 14 | mc.compile(together=ctx.packs, report=mc.diagnostics) 15 | -------------------------------------------------------------------------------- /mecha/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcbeet/mecha/b979a9b747fc8b4893af2d518d7b491cbe96a8ef/mecha/py.typed -------------------------------------------------------------------------------- /mecha/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcbeet/mecha/b979a9b747fc8b4893af2d518d7b491cbe96a8ef/mecha/resources/__init__.py -------------------------------------------------------------------------------- /mecha/resources/inline_function_tag.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "root", 3 | "children": { 4 | "function": { 5 | "type": "literal", 6 | "children": { 7 | "tag": { 8 | "type": "literal", 9 | "children": { 10 | "name": { 11 | "type": "argument", 12 | "parser": "minecraft:resource_location", 13 | "executable": true 14 | } 15 | } 16 | } 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /mecha/resources/patches.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "versions": ["1.16", "1.17", "1.18", "1.19", "1.20", "1.21"], 4 | "config": { 5 | "type": "root", 6 | "children": { 7 | "schedule": { 8 | "type": "literal", 9 | "children": { 10 | "clear": { 11 | "type": "literal", 12 | "children": { 13 | "function": { 14 | "type": "argument", 15 | "parser": "minecraft:function", 16 | "executable": true 17 | } 18 | } 19 | } 20 | } 21 | } 22 | } 23 | } 24 | } 25 | ] 26 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mecha", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "devDependencies": { 8 | "pyright": "^1.1.292" 9 | } 10 | }, 11 | "node_modules/pyright": { 12 | "version": "1.1.292", 13 | "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.292.tgz", 14 | "integrity": "sha512-qwNT2mBKiZXSzVckHkyuCoyrKa8CXh6o4xH7PL/+jeIdiv+a5ljfkxPvIEm6Stln8YEU/tnQb8xODUtgKsu5YA==", 15 | "dev": true, 16 | "bin": { 17 | "pyright": "index.js", 18 | "pyright-langserver": "langserver.index.js" 19 | }, 20 | "engines": { 21 | "node": ">=12.0.0" 22 | } 23 | } 24 | }, 25 | "dependencies": { 26 | "pyright": { 27 | "version": "1.1.292", 28 | "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.292.tgz", 29 | "integrity": "sha512-qwNT2mBKiZXSzVckHkyuCoyrKa8CXh6o4xH7PL/+jeIdiv+a5ljfkxPvIEm6Stln8YEU/tnQb8xODUtgKsu5YA==", 30 | "dev": true 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "watch": "poetry run pyright -w", 4 | "check": "poetry run pyright" 5 | }, 6 | "devDependencies": { 7 | "pyright": "^1.1.292" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # This is a shim to allow Github to detect the package, build is done with poetry 4 | 5 | import setuptools 6 | 7 | if __name__ == "__main__": 8 | setuptools.setup(name="mecha") 9 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcbeet/mecha/b979a9b747fc8b4893af2d518d7b491cbe96a8ef/tests/__init__.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from mecha import CommandSpec, CommandTree, Mecha, get_parsers 4 | 5 | 6 | @pytest.fixture(scope="session") 7 | def mc(): 8 | return Mecha() 9 | 10 | 11 | @pytest.fixture 12 | def mc_1_17(mc: Mecha): 13 | previous_spec = mc.spec 14 | mc.spec = CommandSpec( 15 | tree=CommandTree.load_from(version="1.17"), 16 | parsers=get_parsers("1.17"), 17 | ) 18 | 19 | yield mc 20 | 21 | mc.spec = previous_spec 22 | -------------------------------------------------------------------------------- /tests/resources/SmithedCore-DP-0.0.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcbeet/mecha/b979a9b747fc8b4893af2d518d7b491cbe96a8ef/tests/resources/SmithedCore-DP-0.0.1.zip -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_1_18__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 9, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | locate endcity 22 | scoreboard objectives setdisplay belowName foo 23 | ``` 24 | 25 | ## Resource pack 26 | 27 | `@resource_pack pack.mcmeta` 28 | 29 | ```json 30 | { 31 | "pack": { 32 | "pack_format": 8, 33 | "description": "" 34 | } 35 | } 36 | ``` 37 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_1_20__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | execute if entity @e[type=pig] run return 1 22 | return 0 23 | ``` 24 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | say hello 22 | say world 23 | ``` 24 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_backslash_continuation__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | execute as @a[tag=blob] run function demo:foo 22 | say hello 23 | ``` 24 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_macro_line__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | function demo:thing {name: "steve", eval: "kill @a"} 22 | ``` 23 | 24 | `@function demo:thing` 25 | 26 | ```mcfunction 27 | $say hello $(name) 28 | $ say hello $(name) 29 | $$(eval) 30 | ``` 31 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_messages__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | tellraw @a {"text": "hello", "color": "red"} 22 | ``` 23 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_multiline__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | execute as @a at @s anchored eyes facing 0 0 0 anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.6] run say I'm facing the target! 22 | ``` 23 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_nested_test__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:stuff` 19 | 20 | ```mcfunction 21 | setblock ~ ~ ~ stone 22 | execute if block ~ ~ ~ stone run function demo:stuff/remove 23 | ``` 24 | 25 | `@function demo:stuff/remove` 26 | 27 | ```mcfunction 28 | setblock ~ ~ ~ air 29 | ``` 30 | 31 | `@function demo:foo` 32 | 33 | ```mcfunction 34 | execute as @p run say this is a test 35 | ``` 36 | 37 | `@function demo:stuff/blah` 38 | 39 | ```mcfunction 40 | execute if block ~ ~ ~ stone run say success 41 | ``` 42 | 43 | `@function demo:stuff/remove/generated_0` 44 | 45 | ```mcfunction 46 | say 1 47 | ``` 48 | 49 | `@function demo:stuff/remove/generated_1` 50 | 51 | ```mcfunction 52 | say 2 53 | ``` 54 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_overlay__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | say hello 22 | execute as @a run function demo:stuff 23 | ``` 24 | 25 | `@function demo:stuff` 26 | 27 | ```mcfunction 28 | say a 29 | say b 30 | say c 31 | ``` 32 | 33 | ## Overlay `dummy_overlay` 34 | 35 | `@overlay dummy_overlay` 36 | 37 | ### demo 38 | 39 | `@function demo:foo` 40 | 41 | ```mcfunction 42 | say hello from overlay 43 | execute as @a run function demo:stuff 44 | ``` 45 | 46 | `@function demo:stuff` 47 | 48 | ```mcfunction 49 | say 1 50 | say 2 51 | say 3 52 | ``` 53 | 54 | `@endoverlay` 55 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_overlay_composite__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | }, 13 | "overlays": { 14 | "entries": [ 15 | { 16 | "formats": 12, 17 | "directory": "old" 18 | } 19 | ] 20 | } 21 | } 22 | ``` 23 | 24 | ### demo 25 | 26 | `@function demo:foo` 27 | 28 | ```mcfunction 29 | scoreboard objectives add roll_dice dummy 30 | execute store result score @s roll_dice run random value 1..6 31 | ``` 32 | 33 | ## Overlay `old` 34 | 35 | `@overlay old` 36 | 37 | ### demo 38 | 39 | `@function demo:foo` 40 | 41 | ```mcfunction 42 | scoreboard objectives add roll_dice dummy 43 | scoreboard objectives setdisplay belowName roll_dice 44 | ``` 45 | 46 | `@endoverlay` 47 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_raw__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | say something 22 | execute as @a run say @s 23 | ``` 24 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_readonly__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | # With the `readonly` option functions are left untouched 22 | say hello 23 | 24 | 25 | say world 26 | ``` 27 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_basic_relative_location__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:bar` 19 | 20 | ```mcfunction 21 | say hello 22 | ``` 23 | 24 | `@function demo:folder/wat` 25 | 26 | ```mcfunction 27 | function demo:bar 28 | ``` 29 | 30 | `@function demo:foo` 31 | 32 | ```mcfunction 33 | function demo:folder/wat 34 | function demo:bar 35 | schedule function demo:other 1s 36 | schedule clear demo:other 37 | ``` 38 | 39 | `@function demo:other` 40 | 41 | ```mcfunction 42 | say delayed 43 | ``` 44 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_custom_command__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | say Hello @a[tag=!registered] 22 | execute if score #init temp = #wat temp run say Hello @a[tag=hi] 23 | ``` 24 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_custom_execute_destination__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:bar` 19 | 20 | ```mcfunction 21 | execute as @a run function demo:bar/generated/0x0 22 | ``` 23 | 24 | `@function demo:foo` 25 | 26 | ```mcfunction 27 | execute as @a run function demo:foo/generated/0x0 28 | ``` 29 | 30 | `@function demo:bar/generated/0x0` 31 | 32 | ```mcfunction 33 | say test 34 | say bar 35 | ``` 36 | 37 | `@function demo:foo/generated/0x0` 38 | 39 | ```mcfunction 40 | say test 41 | say foo 42 | ``` 43 | 44 | `@function demo:foo/stuff/generated/0x0` 45 | 46 | ```mcfunction 47 | say test 48 | say foo 49 | ``` 50 | 51 | `@function demo:foo/stuff` 52 | 53 | ```mcfunction 54 | execute as @a run function demo:foo/stuff/generated/0x0 55 | ``` 56 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_gather_objectives__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | scoreboard players set @a foo 1 22 | say @a[scores={thing=..9}] 23 | execute if score @s wat matches 7 run scoreboard players operation @s wat = @p[tag=target, scores={wow=1..}, sort=nearest] wow 24 | ``` 25 | 26 | ### gather_objectives 27 | 28 | `@function gather_objectives:generated_0` 29 | 30 | ```mcfunction 31 | say foo, thing, wat, wow 32 | ``` 33 | -------------------------------------------------------------------------------- /tests/snapshots/examples__build_load_command_tree__0.pack.md: -------------------------------------------------------------------------------- 1 | # Lectern snapshot 2 | 3 | ## Data pack 4 | 5 | `@data_pack pack.mcmeta` 6 | 7 | ```json 8 | { 9 | "pack": { 10 | "pack_format": 48, 11 | "description": "" 12 | } 13 | } 14 | ``` 15 | 16 | ### demo 17 | 18 | `@function demo:foo` 19 | 20 | ```mcfunction 21 | say hello 22 | this_is_valid_now 23 | ``` 24 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_bool_0_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:bool 0 0 2 | --- 3 | {} 4 | --- 5 | true 6 | --- 7 | true 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: True -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_bool_0_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:bool 0 1 2 | --- 3 | {} 4 | --- 5 | false 6 | --- 7 | false 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | value: False -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_bool_1_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:bool 1 0 2 | --- 3 | {} 4 | --- 5 | blob 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected literal 'false' or literal 'true' but got literal 'blob'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_bool_1_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:bool 1 1 2 | --- 3 | {} 4 | --- 5 | thing 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected literal 'false' or literal 'true' but got literal 'thing'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_0_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 0 0 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_0_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 0 1 2 | --- 3 | {} 4 | --- 5 | 1.2 6 | --- 7 | 1.2 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 1.2 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_0_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 0 2 2 | --- 3 | {} 4 | --- 5 | .5 6 | --- 7 | 0.5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: 0.5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_0_3__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 0 3 2 | --- 3 | {} 4 | --- 5 | -1 6 | --- 7 | -1 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: -1 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_0_4__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 0 4 2 | --- 3 | {} 4 | --- 5 | -.5 6 | --- 7 | -0.5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: -0.5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_0_5__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 0 5 2 | --- 3 | {} 4 | --- 5 | -1234.56 6 | --- 7 | -1234.56 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | value: -1234.56 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_1_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 1 0 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | ayy 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected number but got literal 'ayy'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_1_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 1 1 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | -3 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at least 7. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_1_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 1 2 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 0.5 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at least 7. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_double_1_3__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:double 1 3 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 100 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at most 15. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_0_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 0 0 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_0_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 0 1 2 | --- 3 | {} 4 | --- 5 | 1.2 6 | --- 7 | 1.2 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 1.2 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_0_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 0 2 2 | --- 3 | {} 4 | --- 5 | .5 6 | --- 7 | 0.5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: 0.5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_0_3__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 0 3 2 | --- 3 | {} 4 | --- 5 | -1 6 | --- 7 | -1 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: -1 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_0_4__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 0 4 2 | --- 3 | {} 4 | --- 5 | -.5 6 | --- 7 | -0.5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: -0.5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_0_5__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 0 5 2 | --- 3 | {} 4 | --- 5 | -1234.56 6 | --- 7 | -1234.56 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | value: -1234.56 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_1_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 1 0 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | foo 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected number but got literal 'foo'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_1_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 1 1 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | -3 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at least 7. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_1_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 1 2 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 0.5 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at least 7. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_float_1_3__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:float 1 3 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 100 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at most 15. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_0_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 0 0 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_0_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 0 1 2 | --- 3 | {} 4 | --- 5 | 123 6 | --- 7 | 123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 123 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_0_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 0 2 2 | --- 3 | {} 4 | --- 5 | -123 6 | --- 7 | -123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: -123 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_1_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 1 0 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | yolo 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected number but got literal 'yolo'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_1_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 1 1 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | -3 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at least 7. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_1_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 1 2 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 0.5 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer value. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_1_3__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 1 3 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 100 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at most 15. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_integer_1_4__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:integer 1 4 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 11.1 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer value. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_long_0_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:long 0 0 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_long_0_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:long 0 1 2 | --- 3 | {} 4 | --- 5 | 123 6 | --- 7 | 123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 123 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_long_0_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:long 0 2 2 | --- 3 | {} 4 | --- 5 | -123 6 | --- 7 | -123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: -123 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_long_1_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:long 1 0 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | -3 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at least 7. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_long_1_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:long 1 1 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 0.5 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer value. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_long_1_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:long 1 2 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 100 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected value to be at most 15. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_long_1_3__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:long 1 3 2 | --- 3 | {'min': 7, 'max': 15} 4 | --- 5 | 11.1 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer value. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_0_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 0 0 2 | --- 3 | {'type': 'word'} 4 | --- 5 | word 6 | --- 7 | word 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'word' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_0_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 0 1 2 | --- 3 | {'type': 'word'} 4 | --- 5 | word_with_underscores 6 | --- 7 | word_with_underscores 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=21, lineno=1, colno=22) 12 | value: 'word_with_underscores' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_1_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 1 0 2 | --- 3 | {'type': 'phrase'} 4 | --- 5 | "quoted phrase" 6 | --- 7 | "quoted phrase" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | value: 'quoted phrase' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_1_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 1 1 2 | --- 3 | {'type': 'phrase'} 4 | --- 5 | word 6 | --- 7 | word 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'word' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_1_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 1 2 2 | --- 3 | {'type': 'phrase'} 4 | --- 5 | "" 6 | --- 7 | "" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: '' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_2_0__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 2 0 2 | --- 3 | {'type': 'greedy'} 4 | --- 5 | word 6 | --- 7 | word 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'word' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_2_1__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 2 1 2 | --- 3 | {'type': 'greedy'} 4 | --- 5 | words with spaces 6 | --- 7 | words with spaces 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=17, lineno=1, colno=18) 12 | value: 'words with spaces' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_brigadier_string_2_2__0.txt: -------------------------------------------------------------------------------- 1 | brigadier:string 2 2 2 | --- 3 | {'type': 'greedy'} 4 | --- 5 | "and symbols" 6 | --- 7 | "and symbols" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 12 | value: '"and symbols"' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_angle_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:angle 0 0 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | type: 'absolute' 13 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_angle_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:angle 0 1 2 | --- 3 | {} 4 | --- 5 | ~ 6 | --- 7 | ~ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | type: 'relative' 13 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_angle_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:angle 0 2 2 | --- 3 | {} 4 | --- 5 | ~-0.5 6 | --- 7 | ~-0.5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | type: 'relative' 13 | value: -0.5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_angle_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:angle 1 0 2 | --- 3 | {} 4 | --- 5 | ^-3 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying local coordinates not allowed. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_angle_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:angle 1 1 2 | --- 3 | {} 4 | --- 5 | wat 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected coordinate but got literal 'wat'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 0 0 2 | --- 3 | {} 4 | --- 5 | 0 0 0 6 | --- 7 | 0 0 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'absolute' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'absolute' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=4, lineno=1, colno=5) 27 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 28 | type: 'absolute' 29 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 0 1 2 | --- 3 | {} 4 | --- 5 | ~ ~ ~ 6 | --- 7 | ~ ~ ~ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'relative' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'relative' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=4, lineno=1, colno=5) 27 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 28 | type: 'relative' 29 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 0 2 2 | --- 3 | {} 4 | --- 5 | ^ ^ ^ 6 | --- 7 | ^ ^ ^ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'local' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'local' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=4, lineno=1, colno=5) 27 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 28 | type: 'local' 29 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 0 3 2 | --- 3 | {} 4 | --- 5 | ^1 ^ ^-5 6 | --- 7 | ^1 ^ ^-5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | type: 'local' 17 | value: 1 18 | y: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 22 | type: 'local' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=5, lineno=1, colno=6) 27 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 28 | type: 'local' 29 | value: -5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 0 4 2 | --- 3 | {} 4 | --- 5 | ~0.5 ~1 ~-5 6 | --- 7 | ~0.5 ~1 ~-5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 16 | type: 'relative' 17 | value: 0.5 18 | y: 19 | 20 | location: SourceLocation(pos=5, lineno=1, colno=6) 21 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 22 | type: 'relative' 23 | value: 1 24 | z: 25 | 26 | location: SourceLocation(pos=8, lineno=1, colno=9) 27 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 28 | type: 'relative' 29 | value: -5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 1 0 2 | --- 3 | {} 4 | --- 5 | ^-3 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 4: Expected coordinate but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 1 1 2 | --- 3 | {} 4 | --- 5 | wat 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected coordinate but got literal 'wat'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 1 2 2 | --- 3 | {} 4 | --- 5 | 17 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 3: Expected coordinate but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_pos_1_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_pos 1 3 2 | --- 3 | {} 4 | --- 5 | {} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected coordinate but got literal '{}'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 0 0 2 | --- 3 | {} 4 | --- 5 | stone 6 | --- 7 | stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 16 | is_tag: False 17 | namespace: None 18 | path: 'stone' 19 | block_states: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 0 1 2 | --- 3 | {} 4 | --- 5 | minecraft:stone 6 | --- 7 | minecraft:stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 16 | is_tag: False 17 | namespace: 'minecraft' 18 | path: 'stone' 19 | block_states: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 0 3 2 | --- 3 | {} 4 | --- 5 | #stone 6 | --- 7 | #stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 16 | is_tag: True 17 | namespace: None 18 | path: 'stone' 19 | block_states: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 1 0 2 | --- 3 | {} 4 | --- 5 | {} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected resource_location but got literal '{}'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 1 1 2 | --- 3 | {} 4 | --- 5 | #stone[foo=bar, 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 16: Expected quoted_string or word but reached end of file. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 1 2 2 | --- 3 | {} 4 | --- 5 | #stone[ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 8: Expected quoted_string or word but reached end of file. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_1_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 1 3 2 | --- 3 | {} 4 | --- 5 | #stone[foo 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 11: Expected equal but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_1_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 1 4 2 | --- 3 | {} 4 | --- 5 | #stone[thing=hello]{ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 21: Expected number, quoted_string or string but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_predicate_1_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_predicate 1 5 2 | --- 3 | {} 4 | --- 5 | #stone[thing=hello]{what:is:that} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 28: Expected curly '}' but got colon ':'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 0 0 2 | --- 3 | {} 4 | --- 5 | stone 6 | --- 7 | stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 16 | is_tag: False 17 | namespace: None 18 | path: 'stone' 19 | block_states: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 0 1 2 | --- 3 | {} 4 | --- 5 | minecraft:stone 6 | --- 7 | minecraft:stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 16 | is_tag: False 17 | namespace: 'minecraft' 18 | path: 'stone' 19 | block_states: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 1 0 2 | --- 3 | {} 4 | --- 5 | {} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected resource_location but got literal '{}'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 1 1 2 | --- 3 | {} 4 | --- 5 | #stone[foo=bar, 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying a tag is not allowed '#stone'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 1 2 2 | --- 3 | {} 4 | --- 5 | stone[foo=bar, 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 15: Expected quoted_string or word but reached end of file. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_1_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 1 3 2 | --- 3 | {} 4 | --- 5 | stone[ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 7: Expected quoted_string or word but reached end of file. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_1_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 1 4 2 | --- 3 | {} 4 | --- 5 | stone[foo 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 10: Expected equal but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_1_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 1 5 2 | --- 3 | {} 4 | --- 5 | stone[thing=hello]{ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 20: Expected number, quoted_string or string but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_block_state_1_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:block_state 1 6 2 | --- 3 | {} 4 | --- 5 | stone[thing=hello]{what:is:that} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 27: Expected curly '}' but got colon ':'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_color_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:color 0 0 2 | --- 3 | {} 4 | --- 5 | red 6 | --- 7 | red 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 'red' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_color_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:color 0 1 2 | --- 3 | {} 4 | --- 5 | green 6 | --- 7 | green 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | value: 'green' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_color_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:color 1 0 2 | --- 3 | {} 4 | --- 5 | creeper 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected color or color_reset but got literal 'creeper'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_column_pos_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:column_pos 0 0 2 | --- 3 | {} 4 | --- 5 | 0 0 6 | --- 7 | 0 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'absolute' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'absolute' 23 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_column_pos_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:column_pos 0 1 2 | --- 3 | {} 4 | --- 5 | ~ ~ 6 | --- 7 | ~ ~ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'relative' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'relative' 23 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_column_pos_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:column_pos 0 2 2 | --- 3 | {} 4 | --- 5 | ~1 ~-2 6 | --- 7 | ~1 ~-2 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | type: 'relative' 17 | value: 1 18 | y: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 22 | type: 'relative' 23 | value: -2 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_column_pos_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:column_pos 1 0 2 | --- 3 | {} 4 | --- 5 | 7 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 2: Expected coordinate but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_column_pos_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:column_pos 1 1 2 | --- 3 | {} 4 | --- 5 | ^7 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying local coordinates not allowed. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_column_pos_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:column_pos 1 2 2 | --- 3 | {} 4 | --- 5 | @ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected coordinate but got literal '@'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_component_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:component 0 0 2 | --- 3 | {} 4 | --- 5 | "hello world" 6 | --- 7 | "hello world" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 12 | value: String('hello world') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_component_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:component 0 1 2 | --- 3 | {} 4 | --- 5 | "" 6 | --- 7 | "" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: String('') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_component_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:component 0 2 2 | --- 3 | {} 4 | --- 5 | {"text":"hello world"} 6 | --- 7 | {text: "hello world"} 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=22, lineno=1, colno=23) 12 | entries: 13 | 14 | location: SourceLocation(pos=1, lineno=1, colno=2) 15 | end_location: SourceLocation(pos=21, lineno=1, colno=22) 16 | key: 17 | 18 | location: SourceLocation(pos=1, lineno=1, colno=2) 19 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 20 | value: 'text' 21 | value: 22 | 23 | location: SourceLocation(pos=8, lineno=1, colno=9) 24 | end_location: SourceLocation(pos=21, lineno=1, colno=22) 25 | value: String('hello world') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_component_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:component 0 3 2 | --- 3 | {} 4 | --- 5 | [""] 6 | --- 7 | [""] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | elements: 13 | 14 | location: SourceLocation(pos=1, lineno=1, colno=2) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | value: String('') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_component_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:component 0 4 2 | --- 3 | {} 4 | --- 5 | "\u2588" 6 | --- 7 | "\u2588" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | value: String('█') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_component_0_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:component 0 6 2 | --- 3 | {} 4 | --- 5 | wat 6 | --- 7 | "wat" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: String('wat') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_component_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:component 1 0 2 | --- 3 | {} 4 | --- 5 | {"hey": ]} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 9: Expected array, bracket '[', curly '{', number, quoted_string or string but got bracket ']'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_dimension_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:dimension 0 0 2 | --- 3 | {} 4 | --- 5 | minecraft:overworld 6 | --- 7 | minecraft:overworld 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=19, lineno=1, colno=20) 12 | is_tag: False 13 | namespace: 'minecraft' 14 | path: 'overworld' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_dimension_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:dimension 0 1 2 | --- 3 | {} 4 | --- 5 | minecraft:the_nether 6 | --- 7 | minecraft:the_nether 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=20, lineno=1, colno=21) 12 | is_tag: False 13 | namespace: 'minecraft' 14 | path: 'the_nether' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_dimension_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:dimension 1 0 2 | --- 3 | {} 4 | --- 5 | #minecraft:overworld 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying a tag is not allowed '#minecraft:overworld'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 0 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | Player 6 | --- 7 | Player 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | value: 'Player' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_11__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 11 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | @a[ limit = 1 , ] 6 | --- 7 | @a[limit=1] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=17, lineno=1, colno=18) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=4, lineno=1, colno=5) 16 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 22 | value: 'limit' 23 | value: 24 | 25 | location: SourceLocation(pos=12, lineno=1, colno=13) 26 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 27 | value: 1 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_13__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 13 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | @a[ level = 1.. , ] 6 | --- 7 | @a[level=1..] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=19, lineno=1, colno=20) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=4, lineno=1, colno=5) 16 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 22 | value: 'level' 23 | value: 24 | 25 | location: SourceLocation(pos=12, lineno=1, colno=13) 26 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 27 | min: 1 28 | max: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_17__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 17 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | @a[ nbt = {} , ] 6 | --- 7 | @a[nbt={}] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=16, lineno=1, colno=17) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=4, lineno=1, colno=5) 16 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 22 | value: 'nbt' 23 | value: 24 | 25 | location: SourceLocation(pos=10, lineno=1, colno=11) 26 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 27 | entries: 28 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 1 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | 0123 6 | --- 7 | 0123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: '0123' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 2 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | @e 6 | --- 7 | @e 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | variable: 'e' 13 | arguments: 14 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 4 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | dd12be42-52a9-4a91-a8a1-11c01849e498 6 | --- 7 | dd12be42-52a9-4a91-a8a1-11c01849e498 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=36, lineno=1, colno=37) 12 | value: UUID('dd12be42-52a9-4a91-a8a1-11c01849e498') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 5 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | @a[ ] 6 | --- 7 | @a 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | variable: 'a' 13 | arguments: 14 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_0_8__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 0 8 2 | --- 3 | {'type': 'entities', 'amount': 'multiple'} 4 | --- 5 | @a[ distance = ..1 , ] 6 | --- 7 | @a[distance=..1] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=22, lineno=1, colno=23) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=4, lineno=1, colno=5) 16 | end_location: SourceLocation(pos=18, lineno=1, colno=19) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 22 | value: 'distance' 23 | value: 24 | 25 | location: SourceLocation(pos=15, lineno=1, colno=16) 26 | end_location: SourceLocation(pos=18, lineno=1, colno=19) 27 | min: None 28 | max: 1 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 1 0 2 | --- 3 | {'type': 'players', 'amount': 'multiple'} 4 | --- 5 | @e[level=10..] 6 | --- 7 | @e[level=10..] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=14, lineno=1, colno=15) 12 | variable: 'e' 13 | arguments: 14 | 15 | location: SourceLocation(pos=3, lineno=1, colno=4) 16 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 22 | value: 'level' 23 | value: 24 | 25 | location: SourceLocation(pos=9, lineno=1, colno=10) 26 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 27 | min: 10 28 | max: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_2_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 2 0 2 | --- 3 | {'type': 'players', 'amount': 'multiple'} 4 | --- 5 | @e 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected player-type entity selector. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_2_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 2 1 2 | --- 3 | {'type': 'players', 'amount': 'multiple'} 4 | --- 5 | @e[type=foo] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected player-type entity selector. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_2_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 2 2 2 | --- 3 | {'type': 'players', 'amount': 'multiple'} 4 | --- 5 | @a[ gamemode = creative , gamemode = unknown , ] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 38: Expected gamemode but got literal 'unknown'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_3_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 3 0 2 | --- 3 | {'type': 'entities', 'amount': 'single'} 4 | --- 5 | @e[limit=1] 6 | --- 7 | @e[limit=1] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | variable: 'e' 13 | arguments: 14 | 15 | location: SourceLocation(pos=3, lineno=1, colno=4) 16 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 22 | value: 'limit' 23 | value: 24 | 25 | location: SourceLocation(pos=9, lineno=1, colno=10) 26 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 27 | value: 1 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_4_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 4 0 2 | --- 3 | {'type': 'entities', 'amount': 'single'} 4 | --- 5 | @r[limit=7] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected entity selector targeting a single entity. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_4_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 4 1 2 | --- 3 | {'type': 'entities', 'amount': 'single'} 4 | --- 5 | @a[tag=!foo] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected entity selector targeting a single entity. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_5_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 5 0 2 | --- 3 | {'type': 'players', 'amount': 'single'} 4 | --- 5 | #foo 6 | --- 7 | #foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: '#foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_5_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 5 1 2 | --- 3 | {'type': 'players', 'amount': 'single'} 4 | --- 5 | $foo 6 | --- 7 | $foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: '$foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_5_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 5 2 2 | --- 3 | {'type': 'players', 'amount': 'single'} 4 | --- 5 | %foo 6 | --- 7 | %foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: '%foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_5_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity 5 3 2 | --- 3 | {'type': 'players', 'amount': 'single'} 4 | --- 5 | #exp(-0.1)*65536 6 | --- 7 | #exp(-0.1)*65536 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=16, lineno=1, colno=17) 12 | value: '#exp(-0.1)*65536' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_anchor_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity_anchor 0 0 2 | --- 3 | {} 4 | --- 5 | eyes 6 | --- 7 | eyes 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'eyes' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_anchor_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity_anchor 0 1 2 | --- 3 | {} 4 | --- 5 | feet 6 | --- 7 | feet 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'feet' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_summon_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity_summon 0 0 2 | --- 3 | {} 4 | --- 5 | minecraft:pig 6 | --- 7 | minecraft:pig 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 12 | is_tag: False 13 | namespace: 'minecraft' 14 | path: 'pig' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_summon_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity_summon 0 1 2 | --- 3 | {} 4 | --- 5 | cow 6 | --- 7 | cow 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | is_tag: False 13 | namespace: None 14 | path: 'cow' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_summon_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity_summon 1 0 2 | --- 3 | {} 4 | --- 5 | #minecraft:pig 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying a tag is not allowed '#minecraft:pig'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_entity_summon_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:entity_summon 1 1 2 | --- 3 | {} 4 | --- 5 | #cow 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying a tag is not allowed '#cow'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_float_range_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:float_range 0 0 2 | --- 3 | {} 4 | --- 5 | 0..5.2 6 | --- 7 | 0..5.2 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | min: 0 13 | max: 5.2 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_float_range_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:float_range 0 1 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | min: 0 13 | max: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_float_range_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:float_range 0 2 2 | --- 3 | {} 4 | --- 5 | -5.4 6 | --- 7 | -5.4 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | min: -5.4 13 | max: -5.4 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_float_range_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:float_range 0 3 2 | --- 3 | {} 4 | --- 5 | -100.76.. 6 | --- 7 | -100.76.. 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | min: -100.76 13 | max: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_float_range_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:float_range 0 4 2 | --- 3 | {} 4 | --- 5 | ..100 6 | --- 7 | ..100 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | min: None 13 | max: 100 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_float_range_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:float_range 1 0 2 | --- 3 | {} 4 | --- 5 | .. 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected range but got literal '..'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_float_range_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:float_range 1 1 2 | --- 3 | {} 4 | --- 5 | wat 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected range but got literal 'wat'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_function_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:function 0 0 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | is_tag: False 13 | namespace: None 14 | path: 'foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_function_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:function 0 1 2 | --- 3 | {} 4 | --- 5 | foo:bar 6 | --- 7 | foo:bar 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 12 | is_tag: False 13 | namespace: 'foo' 14 | path: 'bar' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_function_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:function 0 2 2 | --- 3 | {} 4 | --- 5 | #foo 6 | --- 7 | #foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | is_tag: True 13 | namespace: None 14 | path: 'foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_game_profile_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:game_profile 0 0 2 | --- 3 | {} 4 | --- 5 | Player 6 | --- 7 | Player 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | value: 'Player' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_game_profile_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:game_profile 0 1 2 | --- 3 | {} 4 | --- 5 | 0123 6 | --- 7 | 0123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: '0123' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_game_profile_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:game_profile 0 2 2 | --- 3 | {} 4 | --- 5 | dd12be42-52a9-4a91-a8a1-11c01849e498 6 | --- 7 | dd12be42-52a9-4a91-a8a1-11c01849e498 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=36, lineno=1, colno=37) 12 | value: UUID('dd12be42-52a9-4a91-a8a1-11c01849e498') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_game_profile_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:game_profile 0 3 2 | --- 3 | {} 4 | --- 5 | @p 6 | --- 7 | @p 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | variable: 'p' 13 | arguments: 14 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_game_profile_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:game_profile 1 0 2 | --- 3 | {} 4 | --- 5 | @e 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected player-type entity selector. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_game_profile_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:game_profile 1 1 2 | --- 3 | {} 4 | --- 5 | @s[type=cow] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected player-type entity selector. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_game_profile_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:game_profile 1 2 2 | --- 3 | {} 4 | --- 5 | @e[type=!player] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected player-type entity selector. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_heightmap_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:heightmap 0 0 2 | --- 3 | {} 4 | --- 5 | world_surface 6 | --- 7 | world_surface 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 12 | value: 'world_surface' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_heightmap_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:heightmap 0 1 2 | --- 3 | {} 4 | --- 5 | motion_blocking 6 | --- 7 | motion_blocking 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | value: 'motion_blocking' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_heightmap_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:heightmap 0 2 2 | --- 3 | {} 4 | --- 5 | motion_blocking_no_leaves 6 | --- 7 | motion_blocking_no_leaves 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=25, lineno=1, colno=26) 12 | value: 'motion_blocking_no_leaves' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_heightmap_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:heightmap 0 3 2 | --- 3 | {} 4 | --- 5 | ocean_floor 6 | --- 7 | ocean_floor 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | value: 'ocean_floor' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_heightmap_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:heightmap 1 0 2 | --- 3 | {} 4 | --- 5 | 123 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected heightmap but got literal '123'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 0 0 2 | --- 3 | {} 4 | --- 5 | 0..5 6 | --- 7 | 0..5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | min: 0 13 | max: 5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 0 1 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | min: 0 13 | max: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 0 2 2 | --- 3 | {} 4 | --- 5 | -5 6 | --- 7 | -5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | min: -5 13 | max: -5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 0 3 2 | --- 3 | {} 4 | --- 5 | -100.. 6 | --- 7 | -100.. 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | min: -100 13 | max: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 0 4 2 | --- 3 | {} 4 | --- 5 | ..100 6 | --- 7 | ..100 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | min: None 13 | max: 100 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_0_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 0 5 2 | --- 3 | {} 4 | --- 5 | ..0 6 | --- 7 | ..0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | min: None 13 | max: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_0_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 0 6 2 | --- 3 | {} 4 | --- 5 | 0.. 6 | --- 7 | 0.. 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | min: 0 13 | max: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 1 0 2 | --- 3 | {} 4 | --- 5 | 0..5.2 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer range. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 1 1 2 | --- 3 | {} 4 | --- 5 | 0.7 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer range. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 1 2 2 | --- 3 | {} 4 | --- 5 | -5.4 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer range. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_1_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 1 3 2 | --- 3 | {} 4 | --- 5 | -100.76.. 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer range. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_int_range_1_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:int_range 1 4 2 | --- 3 | {} 4 | --- 5 | ..100.4 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected integer range. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_enchantment_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_enchantment 0 0 2 | --- 3 | {} 4 | --- 5 | unbreaking 6 | --- 7 | unbreaking 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | value: 'unbreaking' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_enchantment_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_enchantment 0 1 2 | --- 3 | {} 4 | --- 5 | silk_touch 6 | --- 7 | silk_touch 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | value: 'silk_touch' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_predicate_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_predicate 0 0 2 | --- 3 | {} 4 | --- 5 | stick 6 | --- 7 | stick 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 16 | is_tag: False 17 | namespace: None 18 | path: 'stick' 19 | arguments: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_predicate_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_predicate 0 1 2 | --- 3 | {} 4 | --- 5 | minecraft:stick 6 | --- 7 | minecraft:stick 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 16 | is_tag: False 17 | namespace: 'minecraft' 18 | path: 'stick' 19 | arguments: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_predicate_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_predicate 0 2 2 | --- 3 | {} 4 | --- 5 | #stick 6 | --- 7 | #stick 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 16 | is_tag: True 17 | namespace: None 18 | path: 'stick' 19 | arguments: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_predicate_0_7__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_predicate 0 7 2 | --- 3 | {} 4 | --- 5 | * 6 | --- 7 | * 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | value: '*' 17 | arguments: 18 | 19 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_slot_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_slot 0 0 2 | --- 3 | {} 4 | --- 5 | container.5 6 | --- 7 | container.5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | value: 'container.5' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_slot_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_slot 0 1 2 | --- 3 | {} 4 | --- 5 | inventory.12 6 | --- 7 | inventory.12 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 12 | value: 'inventory.12' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_slot_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_slot 0 2 2 | --- 3 | {} 4 | --- 5 | weapon.mainhand 6 | --- 7 | weapon.mainhand 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | value: 'weapon.mainhand' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_slot_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_slot 1 0 2 | --- 3 | {} 4 | --- 5 | container.77 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected item_slot but got literal 'container.77'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_slot_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_slot 1 1 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected item_slot but got literal 'foo'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_stack_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_stack 0 0 2 | --- 3 | {} 4 | --- 5 | stick 6 | --- 7 | stick 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 16 | is_tag: False 17 | namespace: None 18 | path: 'stick' 19 | arguments: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_stack_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_stack 0 1 2 | --- 3 | {} 4 | --- 5 | minecraft:stick 6 | --- 7 | minecraft:stick 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | identifier: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 16 | is_tag: False 17 | namespace: 'minecraft' 18 | path: 'stick' 19 | arguments: 20 | 21 | data_tags: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_stack_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_stack 1 0 2 | --- 3 | {} 4 | --- 5 | #minecraft:stone 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying a tag is not allowed '#minecraft:stone'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_stack_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_stack 1 1 2 | --- 3 | {} 4 | --- 5 | stick[custom_data~{foo: bar}] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 18: Expected equal but got literal '~{foo'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_item_stack_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:item_stack 1 2 2 | --- 3 | {} 4 | --- 5 | * 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected resource_location but got literal '*'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_loot_predicate_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:loot_predicate 0 0 2 | --- 3 | {} 4 | --- 5 | demo:my_predicate 6 | --- 7 | demo:my_predicate 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=17, lineno=1, colno=18) 12 | is_tag: False 13 | namespace: 'demo' 14 | path: 'my_predicate' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_message_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:message 0 0 2 | --- 3 | {} 4 | --- 5 | Hello world! 6 | --- 7 | Hello world! 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 12 | fragments: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 16 | value: 'Hello world!' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_message_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:message 0 1 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | fragments: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | value: 'foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_message_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:message 0 2 2 | --- 3 | {} 4 | --- 5 | @e 6 | --- 7 | @e 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | fragments: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | variable: 'e' 17 | arguments: 18 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_message_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:message 0 3 2 | --- 3 | {} 4 | --- 5 | Hello @p :) 6 | --- 7 | Hello @p :) 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | fragments: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 16 | value: 'Hello ' 17 | 18 | location: SourceLocation(pos=6, lineno=1, colno=7) 19 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 20 | variable: 'p' 21 | arguments: 22 | 23 | 24 | location: SourceLocation(pos=8, lineno=1, colno=9) 25 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 26 | value: ' :)' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_message_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:message 1 0 2 | --- 3 | {} 4 | --- 5 | Hello @p[team=winner :) 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 22: Expected bracket ']' but got invalid ':)'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_mob_effect_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:mob_effect 0 0 2 | --- 3 | {} 4 | --- 5 | spooky 6 | --- 7 | spooky 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | is_tag: False 13 | namespace: None 14 | path: 'spooky' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_mob_effect_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:mob_effect 0 1 2 | --- 3 | {} 4 | --- 5 | effect 6 | --- 7 | effect 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | is_tag: False 13 | namespace: None 14 | path: 'effect' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_compound_tag_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_compound_tag 0 0 2 | --- 3 | {} 4 | --- 5 | {} 6 | --- 7 | {} 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | entries: 13 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_compound_tag_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_compound_tag 0 1 2 | --- 3 | {} 4 | --- 5 | {foo:bar} 6 | --- 7 | {foo: "bar"} 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | entries: 13 | 14 | location: SourceLocation(pos=1, lineno=1, colno=2) 15 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 16 | key: 17 | 18 | location: SourceLocation(pos=1, lineno=1, colno=2) 19 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 20 | value: 'foo' 21 | value: 22 | 23 | location: SourceLocation(pos=5, lineno=1, colno=6) 24 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 25 | value: String('bar') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_compound_tag_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_compound_tag 1 0 2 | --- 3 | {} 4 | --- 5 | [{foo:bar}] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected nbt compound. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 0 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | value: 'foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_12__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 12 2 | --- 3 | {} 4 | --- 5 | foo.bar[] 6 | --- 7 | foo.bar[] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | value: 'foo' 17 | 18 | location: SourceLocation(pos=4, lineno=1, colno=5) 19 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 20 | value: 'bar' 21 | 22 | location: SourceLocation(pos=7, lineno=1, colno=8) 23 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 24 | index: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 1 2 | --- 3 | {} 4 | --- 5 | foo.bar 6 | --- 7 | foo.bar 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | value: 'foo' 17 | 18 | location: SourceLocation(pos=4, lineno=1, colno=5) 19 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 20 | value: 'bar' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 2 2 | --- 3 | {} 4 | --- 5 | foo[0] 6 | --- 7 | foo[0] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | value: 'foo' 17 | 18 | location: SourceLocation(pos=3, lineno=1, colno=4) 19 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 20 | index: 21 | 22 | location: SourceLocation(pos=4, lineno=1, colno=5) 23 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 24 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 3 2 | --- 3 | {} 4 | --- 5 | [0] 6 | --- 7 | [0] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | index: 17 | 18 | location: SourceLocation(pos=1, lineno=1, colno=2) 19 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 20 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 4 2 | --- 3 | {} 4 | --- 5 | [] 6 | --- 7 | [] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | index: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 6 2 | --- 3 | {} 4 | --- 5 | {} 6 | --- 7 | {} 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | entries: 17 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_0_8__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 0 8 2 | --- 3 | {} 4 | --- 5 | foo{}.bar 6 | --- 7 | foo{}.bar 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | components: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | value: 'foo' 17 | 18 | location: SourceLocation(pos=3, lineno=1, colno=4) 19 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 20 | entries: 21 | 22 | 23 | location: SourceLocation(pos=6, lineno=1, colno=7) 24 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 25 | value: 'bar' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_path_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_path 1 0 2 | --- 3 | {} 4 | --- 5 | {foo:bar foo:bar} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 10: Expected curly '}' but got string 'foo'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 0 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: Int(0) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_12__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 12 2 | --- 3 | {} 4 | --- 5 | "\n" 6 | --- 7 | "\n" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: String('\n') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_13__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 13 2 | --- 3 | {} 4 | --- 5 | [a,1] 6 | --- 7 | ["a", 1] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | elements: 13 | 14 | location: SourceLocation(pos=1, lineno=1, colno=2) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | value: String('a') 17 | 18 | location: SourceLocation(pos=3, lineno=1, colno=4) 19 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 20 | value: Int(1) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_14__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 14 2 | --- 3 | {} 4 | --- 5 | [[],[],1b] 6 | --- 7 | [[], [], 1b] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | elements: 13 | 14 | location: SourceLocation(pos=1, lineno=1, colno=2) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | elements: 17 | 18 | 19 | location: SourceLocation(pos=4, lineno=1, colno=5) 20 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 21 | elements: 22 | 23 | 24 | location: SourceLocation(pos=7, lineno=1, colno=8) 25 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 26 | value: Byte(1) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 1 2 | --- 3 | {} 4 | --- 5 | 0b 6 | --- 7 | 0b 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: Byte(0) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 2 2 | --- 3 | {} 4 | --- 5 | 0l 6 | --- 7 | 0L 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: Long(0) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 3 2 | --- 3 | {} 4 | --- 5 | 0.0 6 | --- 7 | 0.0d 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: Double(0.0) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 4 2 | --- 3 | {} 4 | --- 5 | "foo" 6 | --- 7 | "foo" 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | value: String('foo') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 5 2 | --- 3 | {} 4 | --- 5 | {foo:bar} 6 | --- 7 | {foo: "bar"} 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | entries: 13 | 14 | location: SourceLocation(pos=1, lineno=1, colno=2) 15 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 16 | key: 17 | 18 | location: SourceLocation(pos=1, lineno=1, colno=2) 19 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 20 | value: 'foo' 21 | value: 22 | 23 | location: SourceLocation(pos=5, lineno=1, colno=6) 24 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 25 | value: String('bar') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 6 2 | --- 3 | {} 4 | --- 5 | [B; 1b] 6 | --- 7 | [B; 1b] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 12 | elements: 13 | 14 | location: SourceLocation(pos=4, lineno=1, colno=5) 15 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 16 | value: Byte(1) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_7__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 7 2 | --- 3 | {} 4 | --- 5 | [I;-1] 6 | --- 7 | [I; -1] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | elements: 13 | 14 | location: SourceLocation(pos=3, lineno=1, colno=4) 15 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 16 | value: Int(-1) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_8__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 8 2 | --- 3 | {} 4 | --- 5 | [L;1l,2l] 6 | --- 7 | [L; 1L, 2L] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | elements: 13 | 14 | location: SourceLocation(pos=3, lineno=1, colno=4) 15 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 16 | value: Long(1) 17 | 18 | location: SourceLocation(pos=6, lineno=1, colno=7) 19 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 20 | value: Long(2) -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_0_9__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 0 9 2 | --- 3 | {} 4 | --- 5 | [a, b, c] 6 | --- 7 | ["a", "b", "c"] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | elements: 13 | 14 | location: SourceLocation(pos=1, lineno=1, colno=2) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | value: String('a') 17 | 18 | location: SourceLocation(pos=4, lineno=1, colno=5) 19 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 20 | value: String('b') 21 | 22 | location: SourceLocation(pos=7, lineno=1, colno=8) 23 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 24 | value: String('c') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 0 2 | --- 3 | {} 4 | --- 5 | "\" 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected array, bracket '[', curly '{', number, quoted_string or string but got literal '"\\"'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_10__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 10 2 | --- 3 | {} 4 | --- 5 | {error: [test]]} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 15: Expected curly '}' but got bracket ']'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_11__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 11 2 | --- 3 | {} 4 | --- 5 | [{,{}] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 3: Expected number, quoted_string or string but got comma ','. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_12__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 12 2 | --- 3 | {} 4 | --- 5 | "\'" 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 2: Invalid escape sequence \'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_13__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 13 2 | --- 3 | {} 4 | --- 5 | '\"' 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 2: Invalid escape sequence \". -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 1 2 | --- 3 | {} 4 | --- 5 | "\\\" 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected array, bracket '[', curly '{', number, quoted_string or string but got literal '"\\\\\\"'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 2 2 | --- 3 | {} 4 | --- 5 | {"\":1} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 2: Expected number, quoted_string or string but got literal '"\\"'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 3 2 | --- 3 | {} 4 | --- 5 | [B;5l,4l,3] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 4: Expected all elements to be bytes. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 4 2 | --- 3 | {} 4 | --- 5 | [I;5l,4l,3] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 4: Expected all elements to be integers. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 5 2 | --- 3 | {} 4 | --- 5 | [L;5l,4l,3] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 10: Expected all elements to be long integers. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 6 2 | --- 3 | {} 4 | --- 5 | {hello,world} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 7: Expected colon but got comma ','. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_7__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 7 2 | --- 3 | {} 4 | --- 5 | {with space: 5} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 7: Expected colon but got string 'space'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_8__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 8 2 | --- 3 | {} 4 | --- 5 | {\": no} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 2: Expected number, quoted_string or string but got literal '\\"'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_nbt_tag_1_9__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:nbt_tag 1 9 2 | --- 3 | {} 4 | --- 5 | {foo: [1,2} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 11: Expected bracket ']' but got curly '}'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective 0 0 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 'foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective 0 1 2 | --- 3 | {} 4 | --- 5 | * 6 | --- 7 | * 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: '*' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective 0 2 2 | --- 3 | {} 4 | --- 5 | 012 6 | --- 7 | 012 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: '012' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 0 2 | --- 3 | {} 4 | --- 5 | minecraft.mined:minecraft.stone 6 | --- 7 | minecraft.mined:minecraft.stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=31, lineno=1, colno=32) 12 | value: 'minecraft.mined:minecraft.stone' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 1 2 | --- 3 | {} 4 | --- 5 | mined:minecraft.stone 6 | --- 7 | mined:minecraft.stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=21, lineno=1, colno=22) 12 | value: 'mined:minecraft.stone' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 2 2 | --- 3 | {} 4 | --- 5 | minecraft.mined:stone 6 | --- 7 | minecraft.mined:stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=21, lineno=1, colno=22) 12 | value: 'minecraft.mined:stone' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 3 2 | --- 3 | {} 4 | --- 5 | mined:stone 6 | --- 7 | mined:stone 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | value: 'mined:stone' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 4 2 | --- 3 | {} 4 | --- 5 | dummy 6 | --- 7 | dummy 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | value: 'dummy' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 5 2 | --- 3 | {} 4 | --- 5 | deathCount 6 | --- 7 | deathCount 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | value: 'deathCount' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 6 2 | --- 3 | {} 4 | --- 5 | playerKillCount 6 | --- 7 | playerKillCount 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=15, lineno=1, colno=16) 12 | value: 'playerKillCount' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_objective_criteria_0_7__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:objective_criteria 0 7 2 | --- 3 | {} 4 | --- 5 | teamkill.aqua 6 | --- 7 | teamkill.aqua 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=13, lineno=1, colno=14) 12 | value: 'teamkill.aqua' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_operation_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:operation 0 0 2 | --- 3 | {} 4 | --- 5 | = 6 | --- 7 | = 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: '=' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_operation_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:operation 0 1 2 | --- 3 | {} 4 | --- 5 | > 6 | --- 7 | > 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: '>' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_operation_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:operation 0 2 2 | --- 3 | {} 4 | --- 5 | < 6 | --- 7 | < 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: '<' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_operation_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:operation 1 0 2 | --- 3 | {} 4 | --- 5 | wat 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected scoreboard_operation but got literal 'wat'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 0 0 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | name: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | is_tag: False 17 | namespace: None 18 | path: 'foo' 19 | parameters: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_0_10__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 0 10 2 | --- 3 | {} 4 | --- 5 | shriek 100 6 | --- 7 | shriek 100 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | name: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 16 | is_tag: False 17 | namespace: None 18 | path: 'shriek' 19 | parameters: 20 | 21 | location: SourceLocation(pos=7, lineno=1, colno=8) 22 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 23 | delay: 24 | 25 | location: SourceLocation(pos=7, lineno=1, colno=8) 26 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 27 | value: 100 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 0 1 2 | --- 3 | {} 4 | --- 5 | foo:bar 6 | --- 7 | foo:bar 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 12 | name: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 16 | is_tag: False 17 | namespace: 'foo' 18 | path: 'bar' 19 | parameters: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_0_9__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 0 9 2 | --- 3 | {} 4 | --- 5 | sculk_charge 1.5707 6 | --- 7 | sculk_charge 1.5707 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=19, lineno=1, colno=20) 12 | name: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 16 | is_tag: False 17 | namespace: None 18 | path: 'sculk_charge' 19 | parameters: 20 | 21 | location: SourceLocation(pos=13, lineno=1, colno=14) 22 | end_location: SourceLocation(pos=19, lineno=1, colno=20) 23 | angle: 24 | 25 | location: SourceLocation(pos=13, lineno=1, colno=14) 26 | end_location: SourceLocation(pos=19, lineno=1, colno=20) 27 | value: 1.5707 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 0 2 | --- 3 | {} 4 | --- 5 | dust 1.0 0.5 0.5 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 17: Expected number but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 1 2 | --- 3 | {} 4 | --- 5 | minecraft:dust_color_transition 1.0 0.0 0.0 hello 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 45: Expected number but got literal 'hello'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 2 2 | --- 3 | {} 4 | --- 5 | block minecraft:grass_block[snowy=] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 35: Expected quoted_string or word but got bracket ']'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 3 2 | --- 3 | {} 4 | --- 5 | falling_dust grass_block[snowy=true]{hello: world wat} 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 51: Expected curly '}' but got string 'wat'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 4 2 | --- 3 | {} 4 | --- 5 | item minecraft:apple{ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 22: Expected number, quoted_string or string but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 5 2 | --- 3 | {} 4 | --- 5 | vibration 5.0 64.0 0.0 ~ ~ ~ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 24: Expected number but got literal '~'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 6 2 | --- 3 | {} 4 | --- 5 | vibration 5.0 64.0 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 19: Expected number but got eof. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_7__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 7 2 | --- 3 | {} 4 | --- 5 | sculk_charge ~ ~ ~ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 14: Expected number but got literal '~'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_particle_1_8__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:particle 1 8 2 | --- 3 | {} 4 | --- 5 | shriek ~ ~ ~ 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 8: Expected number but got literal '~'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_resource_location_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:resource_location 0 0 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | is_tag: False 13 | namespace: None 14 | path: 'foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_resource_location_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:resource_location 0 1 2 | --- 3 | {} 4 | --- 5 | foo:bar 6 | --- 7 | foo:bar 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 12 | is_tag: False 13 | namespace: 'foo' 14 | path: 'bar' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_resource_location_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:resource_location 0 2 2 | --- 3 | {} 4 | --- 5 | 012 6 | --- 7 | 012 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | is_tag: False 13 | namespace: None 14 | path: '012' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_resource_location_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:resource_location 1 0 2 | --- 3 | {} 4 | --- 5 | #thing 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Specifying a tag is not allowed '#thing'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_rotation_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:rotation 0 0 2 | --- 3 | {} 4 | --- 5 | 0 0 6 | --- 7 | 0 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'absolute' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'absolute' 23 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_rotation_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:rotation 0 1 2 | --- 3 | {} 4 | --- 5 | ~ ~ 6 | --- 7 | ~ ~ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'relative' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'relative' 23 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_rotation_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:rotation 0 2 2 | --- 3 | {} 4 | --- 5 | ~-5 ~5 6 | --- 7 | ~-5 ~5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | type: 'relative' 17 | value: -5 18 | y: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 22 | type: 'relative' 23 | value: 5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_rotation_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:rotation 1 0 2 | --- 3 | {} 4 | --- 5 | -5 ^5 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 4: Specifying local coordinates not allowed. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 0 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | Player 6 | --- 7 | Player 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | value: 'Player' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_18__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 18 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | @a[team=] 6 | --- 7 | @a[team=] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=3, lineno=1, colno=4) 16 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 22 | value: 'team' 23 | value: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_19__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 19 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | @a[team=!] 6 | --- 7 | @a[team=!] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=3, lineno=1, colno=4) 16 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 17 | inverted: True 18 | key: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 22 | value: 'team' 23 | value: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 1 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | 0123 6 | --- 7 | 0123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: '0123' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_20__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 20 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | @a[tag=] 6 | --- 7 | @a[tag=] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=3, lineno=1, colno=4) 16 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 22 | value: 'tag' 23 | value: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_21__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 21 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | @a[tag=!] 6 | --- 7 | @a[tag=!] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=9, lineno=1, colno=10) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=3, lineno=1, colno=4) 16 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 17 | inverted: True 18 | key: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 22 | value: 'tag' 23 | value: None -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_22__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 22 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | #bruh 6 | --- 7 | #bruh 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | value: '#bruh' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_23__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 23 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | %foo.bar 6 | --- 7 | %foo.bar 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | value: '%foo.bar' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_24__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 24 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | $heey.this-+weird:butok 6 | --- 7 | $heey.this-+weird:butok 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=23, lineno=1, colno=24) 12 | value: '$heey.this-+weird:butok' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_25__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 25 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | #no_flag:start 6 | --- 7 | #no_flag:start 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=14, lineno=1, colno=15) 12 | value: '#no_flag:start' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 2 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | * 6 | --- 7 | * 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: '*' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 3 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | @e 6 | --- 7 | @e 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | variable: 'e' 13 | arguments: 14 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_0_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 0 6 2 | --- 3 | {'amount': 'multiple'} 4 | --- 5 | @a[ sort = arbitrary , ] 6 | --- 7 | @a[sort=arbitrary] 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=24, lineno=1, colno=25) 12 | variable: 'a' 13 | arguments: 14 | 15 | location: SourceLocation(pos=4, lineno=1, colno=5) 16 | end_location: SourceLocation(pos=20, lineno=1, colno=21) 17 | inverted: False 18 | key: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 22 | value: 'sort' 23 | value: 24 | 25 | location: SourceLocation(pos=11, lineno=1, colno=12) 26 | end_location: SourceLocation(pos=20, lineno=1, colno=21) 27 | value: 'arbitrary' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 1 0 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @s 6 | --- 7 | @s 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | variable: 's' 13 | arguments: 14 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 1 1 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @p 6 | --- 7 | @p 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | variable: 'p' 13 | arguments: 14 | -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_2_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 2 0 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @a 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected entity selector targeting a single entity. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_2_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 2 1 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @e[type=minecraft:marker, sort=wat, limit=1] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 32: Expected sort_order but got literal 'wat,'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_2_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 2 2 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @e[tag=foo, sort=nearest] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected entity selector targeting a single entity. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_2_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 2 3 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @a[ = 1 , ] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 5: Expected quoted_string or word but got equal '='. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_2_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 2 4 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @s[ sort = arbitrary , sort = unknown , ] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 31: Expected sort_order but got literal 'unknown'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_2_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 2 5 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @a[ unknown = 1 , ] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 5: Invalid selector argument 'unknown'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_score_holder_2_6__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:score_holder 2 6 2 | --- 3 | {'amount': 'single'} 4 | --- 5 | @a[name=] 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 4: Argument 'name' must have a value. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_scoreboard_slot_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:scoreboard_slot 0 0 2 | --- 3 | {} 4 | --- 5 | sidebar 6 | --- 7 | sidebar 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 12 | value: 'sidebar' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_scoreboard_slot_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:scoreboard_slot 0 1 2 | --- 3 | {} 4 | --- 5 | list 6 | --- 7 | list 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'list' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_scoreboard_slot_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:scoreboard_slot 0 2 2 | --- 3 | {} 4 | --- 5 | sidebar.team.red 6 | --- 7 | sidebar.team.red 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=16, lineno=1, colno=17) 12 | value: 'sidebar.team.red' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_scoreboard_slot_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:scoreboard_slot 0 3 2 | --- 3 | {} 4 | --- 5 | below_name 6 | --- 7 | below_name 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | value: 'below_name' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_scoreboard_slot_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:scoreboard_slot 1 0 2 | --- 3 | {} 4 | --- 5 | sidebr 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected scoreboard_slot but got literal 'sidebr'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_scoreboard_slot_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:scoreboard_slot 1 1 2 | --- 3 | {} 4 | --- 5 | foo.bar 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected scoreboard_slot but got literal 'foo.bar'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_swizzle_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:swizzle 0 0 2 | --- 3 | {} 4 | --- 5 | xyz 6 | --- 7 | xyz 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 'xyz' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_swizzle_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:swizzle 0 1 2 | --- 3 | {} 4 | --- 5 | x 6 | --- 7 | x 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: 'x' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_swizzle_1_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:swizzle 1 0 2 | --- 3 | {} 4 | --- 5 | sup 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected swizzle but got literal 'sup'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_swizzle_1_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:swizzle 1 1 2 | --- 3 | {} 4 | --- 5 | wat 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected swizzle but got literal 'wat'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_swizzle_1_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:swizzle 1 2 2 | --- 3 | {} 4 | --- 5 | xx 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected swizzle but got literal 'xx'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_swizzle_1_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:swizzle 1 3 2 | --- 3 | {} 4 | --- 5 | yzy 6 | --- 7 | Reported 1 error. 8 | 9 | line 1, column 1: Expected swizzle but got literal 'yzy'. -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_team_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:team 0 0 2 | --- 3 | {} 4 | --- 5 | foo 6 | --- 7 | foo 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: 'foo' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_team_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:team 0 1 2 | --- 3 | {} 4 | --- 5 | 123 6 | --- 7 | 123 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: '123' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_template_mirror_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:template_mirror 0 0 2 | --- 3 | {} 4 | --- 5 | front_back 6 | --- 7 | front_back 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | value: 'front_back' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_template_mirror_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:template_mirror 0 1 2 | --- 3 | {} 4 | --- 5 | left_right 6 | --- 7 | left_right 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | value: 'left_right' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_template_mirror_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:template_mirror 0 2 2 | --- 3 | {} 4 | --- 5 | none 6 | --- 7 | none 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'none' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_template_rotation_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:template_rotation 0 0 2 | --- 3 | {} 4 | --- 5 | 180 6 | --- 7 | 180 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | value: '180' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_template_rotation_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:template_rotation 0 1 2 | --- 3 | {} 4 | --- 5 | clockwise_90 6 | --- 7 | clockwise_90 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=12, lineno=1, colno=13) 12 | value: 'clockwise_90' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_template_rotation_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:template_rotation 0 2 2 | --- 3 | {} 4 | --- 5 | counterclockwise_90 6 | --- 7 | counterclockwise_90 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=19, lineno=1, colno=20) 12 | value: 'counterclockwise_90' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_template_rotation_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:template_rotation 0 3 2 | --- 3 | {} 4 | --- 5 | none 6 | --- 7 | none 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 12 | value: 'none' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_time_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:time 0 0 2 | --- 3 | {} 4 | --- 5 | 0d 6 | --- 7 | 0d 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: 0 13 | unit: 'day' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_time_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:time 0 1 2 | --- 3 | {} 4 | --- 5 | 0s 6 | --- 7 | 0s 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: 0 13 | unit: 'second' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_time_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:time 0 2 2 | --- 3 | {} 4 | --- 5 | 0t 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 12 | value: 0 13 | unit: 'tick' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_time_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:time 0 3 2 | --- 3 | {} 4 | --- 5 | 0 6 | --- 7 | 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 12 | value: 0 13 | unit: 'tick' -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_uuid_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:uuid 0 0 2 | --- 3 | {} 4 | --- 5 | dd12be42-52a9-4a91-a8a1-11c01849e498 6 | --- 7 | dd12be42-52a9-4a91-a8a1-11c01849e498 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=36, lineno=1, colno=37) 12 | value: UUID('dd12be42-52a9-4a91-a8a1-11c01849e498') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_uuid_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:uuid 0 1 2 | --- 3 | {} 4 | --- 5 | af-0-0-0-1 6 | --- 7 | 000000af-0000-0000-0000-000000000001 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=10, lineno=1, colno=11) 12 | value: UUID('000000af-0000-0000-0000-000000000001') -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec2_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec2 0 0 2 | --- 3 | {} 4 | --- 5 | 0 0 6 | --- 7 | 0 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'absolute' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'absolute' 23 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec2_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec2 0 1 2 | --- 3 | {} 4 | --- 5 | ~ ~ 6 | --- 7 | ~ ~ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'relative' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'relative' 23 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec2_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec2 0 2 2 | --- 3 | {} 4 | --- 5 | 0.1 -0.5 6 | --- 7 | 0.1 -0.5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | type: 'absolute' 17 | value: 0.1 18 | y: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 22 | type: 'absolute' 23 | value: -0.5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec2_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec2 0 3 2 | --- 3 | {} 4 | --- 5 | ~1 ~-2 6 | --- 7 | ~1 ~-2 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | type: 'relative' 17 | value: 1 18 | y: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=6, lineno=1, colno=7) 22 | type: 'relative' 23 | value: -2 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec3_0_0__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec3 0 0 2 | --- 3 | {} 4 | --- 5 | 0 0 0 6 | --- 7 | 0 0 0 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'absolute' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'absolute' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=4, lineno=1, colno=5) 27 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 28 | type: 'absolute' 29 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec3_0_1__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec3 0 1 2 | --- 3 | {} 4 | --- 5 | ~ ~ ~ 6 | --- 7 | ~ ~ ~ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'relative' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'relative' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=4, lineno=1, colno=5) 27 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 28 | type: 'relative' 29 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec3_0_2__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec3 0 2 2 | --- 3 | {} 4 | --- 5 | ^ ^ ^ 6 | --- 7 | ^ ^ ^ 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=1, lineno=1, colno=2) 16 | type: 'local' 17 | value: 0 18 | y: 19 | 20 | location: SourceLocation(pos=2, lineno=1, colno=3) 21 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 22 | type: 'local' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=4, lineno=1, colno=5) 27 | end_location: SourceLocation(pos=5, lineno=1, colno=6) 28 | type: 'local' 29 | value: 0 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec3_0_3__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec3 0 3 2 | --- 3 | {} 4 | --- 5 | ^1 ^ ^-5 6 | --- 7 | ^1 ^ ^-5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=2, lineno=1, colno=3) 16 | type: 'local' 17 | value: 1 18 | y: 19 | 20 | location: SourceLocation(pos=3, lineno=1, colno=4) 21 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 22 | type: 'local' 23 | value: 0 24 | z: 25 | 26 | location: SourceLocation(pos=5, lineno=1, colno=6) 27 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 28 | type: 'local' 29 | value: -5 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec3_0_4__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec3 0 4 2 | --- 3 | {} 4 | --- 5 | 0.1 -0.5 .9 6 | --- 7 | 0.1 -0.5 0.9 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=3, lineno=1, colno=4) 16 | type: 'absolute' 17 | value: 0.1 18 | y: 19 | 20 | location: SourceLocation(pos=4, lineno=1, colno=5) 21 | end_location: SourceLocation(pos=8, lineno=1, colno=9) 22 | type: 'absolute' 23 | value: -0.5 24 | z: 25 | 26 | location: SourceLocation(pos=9, lineno=1, colno=10) 27 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 28 | type: 'absolute' 29 | value: 0.9 -------------------------------------------------------------------------------- /tests/snapshots/parse__argument_examples_minecraft_vec3_0_5__0.txt: -------------------------------------------------------------------------------- 1 | minecraft:vec3 0 5 2 | --- 3 | {} 4 | --- 5 | ~0.5 ~1 ~-5 6 | --- 7 | ~0.5 ~1 ~-5 8 | --- 9 | 10 | location: SourceLocation(pos=0, lineno=1, colno=1) 11 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 12 | x: 13 | 14 | location: SourceLocation(pos=0, lineno=1, colno=1) 15 | end_location: SourceLocation(pos=4, lineno=1, colno=5) 16 | type: 'relative' 17 | value: 0.5 18 | y: 19 | 20 | location: SourceLocation(pos=5, lineno=1, colno=6) 21 | end_location: SourceLocation(pos=7, lineno=1, colno=8) 22 | type: 'relative' 23 | value: 1 24 | z: 25 | 26 | location: SourceLocation(pos=8, lineno=1, colno=9) 27 | end_location: SourceLocation(pos=11, lineno=1, colno=12) 28 | type: 'relative' 29 | value: -5 -------------------------------------------------------------------------------- /tests/snapshots/parse__multiline__1.txt: -------------------------------------------------------------------------------- 1 | execute as @a at @s anchored eyes facing 0 0 0 anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.6] run say I'm facing the target! 2 | -------------------------------------------------------------------------------- /tests/snapshots/parse__say__2.txt: -------------------------------------------------------------------------------- 1 | say hello @s world 2 | say thing 3 | -------------------------------------------------------------------------------- /tests/snapshots/parse__say__3.txt: -------------------------------------------------------------------------------- 1 | say hello @s world say thing 2 | -------------------------------------------------------------------------------- /tests/test_examples.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import pytest 4 | from beet import run_beet 5 | from lectern import Document 6 | from pytest_insta import SnapshotFixture 7 | 8 | 9 | @pytest.mark.parametrize("directory", os.listdir("examples")) 10 | def test_build(snapshot: SnapshotFixture, directory: str): 11 | with run_beet(directory=f"examples/{directory}") as ctx: 12 | assert snapshot("pack.md") == ctx.inject(Document) 13 | -------------------------------------------------------------------------------- /tests/test_mcdoc.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | import pytest 4 | from pytest_insta import SnapshotFixture 5 | from tokenstream import TokenStream 6 | 7 | from mecha.contrib.validation import parse_mcdoc 8 | 9 | MCDOC_EXAMPLES = Path("tests/resources/mcdoc_examples.txt").read_text().split("###\n") 10 | 11 | 12 | @pytest.mark.parametrize( 13 | "source", 14 | MCDOC_EXAMPLES, 15 | ids=range(len(MCDOC_EXAMPLES)), 16 | ) 17 | def test_parse(snapshot: SnapshotFixture, source: str): 18 | mcdoc = parse_mcdoc(TokenStream(source)) 19 | assert snapshot() == f"{source}---\n{mcdoc.dump()}\n" 20 | -------------------------------------------------------------------------------- /tests/test_stats.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from beet import Context, DataPack, run_beet 3 | from pytest_insta import SnapshotFixture 4 | 5 | from mecha import Mecha 6 | from mecha.contrib.statistics import Analyzer, Summary 7 | 8 | 9 | @pytest.fixture(scope="session") 10 | def ctx_stats(): 11 | with run_beet( 12 | { 13 | "minecraft": "1.19", 14 | "require": ["mecha.contrib.statistics"], 15 | } 16 | ) as ctx: 17 | yield ctx 18 | 19 | 20 | def test_smithed_core(snapshot: SnapshotFixture, ctx_stats: Context): 21 | mc = ctx_stats.inject(Mecha) 22 | analyzer = ctx_stats.inject(Analyzer) 23 | mc.compile(DataPack(path="tests/resources/SmithedCore-DP-0.0.1.zip")) 24 | assert snapshot() == str(Summary(mc.spec, analyzer.stats)) 25 | -------------------------------------------------------------------------------- /typings/nbtlib.py: -------------------------------------------------------------------------------- 1 | from typing import Any 2 | 3 | Byte = Any 4 | ByteArray = Any 5 | Compound = Any 6 | CompoundMatch = Any 7 | Double = Any 8 | Float = Any 9 | Int = Any 10 | IntArray = Any 11 | ListIndex = Any 12 | Long = Any 13 | LongArray = Any 14 | NamedKey = Any 15 | Numeric = Any 16 | OutOfRange = Any 17 | Path = Any 18 | Short = Any 19 | String = Any 20 | List = Any 21 | --------------------------------------------------------------------------------