From 3f9556f9aace50a05779e15094127fc5437e0f27 Mon Sep 17 00:00:00 2001 From: gnembon Date: Wed, 18 Mar 2020 00:47:30 -0300 Subject: [PATCH] added legacy untracked npp lang specs --- docs/scarpet/Documentation.md | 2 +- .../editors/npp/scarpet_v1.0_notepad++.xml | 64 +++++++++++++++++++ .../editors/npp/scarpet_v1.4_notepad++.xml | 64 +++++++++++++++++++ .../editors/npp/scarpet_v1.5_notepad++.xml | 64 +++++++++++++++++++ .../editors/npp/scarpet_v1.6_notepad++.xml | 64 +++++++++++++++++++ .../java/carpet/script/value/ListValue.java | 6 +- 6 files changed, 260 insertions(+), 4 deletions(-) create mode 100644 docs/scarpet/resources/editors/npp/scarpet_v1.0_notepad++.xml create mode 100644 docs/scarpet/resources/editors/npp/scarpet_v1.4_notepad++.xml create mode 100644 docs/scarpet/resources/editors/npp/scarpet_v1.5_notepad++.xml create mode 100644 docs/scarpet/resources/editors/npp/scarpet_v1.6_notepad++.xml diff --git a/docs/scarpet/Documentation.md b/docs/scarpet/Documentation.md index fcc8dc42..8c57678c 100644 --- a/docs/scarpet/Documentation.md +++ b/docs/scarpet/Documentation.md @@ -1,4 +1,4 @@ -# API Reference +# Scarpet Language Documentation ## Language Specification diff --git a/docs/scarpet/resources/editors/npp/scarpet_v1.0_notepad++.xml b/docs/scarpet/resources/editors/npp/scarpet_v1.0_notepad++.xml new file mode 100644 index 00000000..6945ced9 --- /dev/null +++ b/docs/scarpet/resources/editors/npp/scarpet_v1.0_notepad++.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + ; + - * / % ^ && || > >= < <= == != = += -> <> ! , ~ + + ( + + ) + + + + + + + not fact rand sin cos tan asin acos atan atan2 sinh cosh tanh sec csc sech csch cot acot coth asinh acosh atanh rad deg log log10 log1p sqrt max min abs round floor ceil mandelbrot relu print return exit throw try l join split slice sort sort_key range element put var undef vars if loop map filter first all for while reduce outer bool number str length rand sleep time + block pos solid air liquid flammable transparent opacity blocks_daylight emitted_light light block_light sky_light see_sky hardness blast_resistance top loaded loaded_ep suffocates power ticks_randomly update block_tick random_tick set blocks_movement block_sound material map_colour property player entity_id entity_list entity_area entity_selector query modify scan volume neighbours rect diamond sound particle particle_line particle_rect run save tick_time game_tick plop harvest destroy schedule + euler pi null true false + x y z p + _ _i _a _x _y _z + global_ + __command __on_player_jumps __on_player_deploys_elytra __on_player_wakes_up __on_player_rides __on_player_uses_item __on_player_clicks_block __on_player_right_clicks_block __on_player_breaks_block __on_player_interacts_with_entity __on_player_attacks_entity __on_player_starts_sneaking __on_player_stops_sneaking __on_player_starts_sprinting __on_player_stops_sprinting + $ + 00' 01\ 02' 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/scarpet/resources/editors/npp/scarpet_v1.4_notepad++.xml b/docs/scarpet/resources/editors/npp/scarpet_v1.4_notepad++.xml new file mode 100644 index 00000000..e704c021 --- /dev/null +++ b/docs/scarpet/resources/editors/npp/scarpet_v1.4_notepad++.xml @@ -0,0 +1,64 @@ + + + + + + + + 00// 01 02 03 04 + + + + + + + + ; + - * / % ^ && || > >= < <= == != = += -> <> ! , ~ + + ( + + ) + + + + + + + not fact rand sin cos tan asin acos atan atan2 sinh cosh tanh sec csc sech csch cot acot coth asinh acosh atanh rad deg log log10 log1p sqrt max min abs round floor ceil mandelbrot relu print return exit throw try l join split slice sort sort_key range get put var undef vars if loop map filter first all for while reduce outer type bool number str length rand sleep time + block pos solid air liquid flammable transparent opacity blocks_daylight emitted_light light block_light sky_light see_sky hardness blast_resistance top loaded loaded_ep suffocates power ticks_randomly update block_tick random_tick set blocks_movement block_sound material map_colour property block_properties block_data place_item set_biome player spawn entity_id entity_list entity_area entity_selector query modify stack_limit inventory_size inventory_get inventory_set inventory_find inventory_remove drop_item scan volume neighbours rect diamond sound particle particle_line particle_rect run save tick_time game_tick plop harvest destroy schedule nbt create_marker remove_all_markers + euler pi null true false + x y z p + _ _i _a _x _y _z + global_ + __command __on_player_jumps __on_player_deploys_elytra __on_player_wakes_up __on_player_rides __on_player_uses_item __on_player_clicks_block __on_player_right_clicks_block __on_player_breaks_block __on_player_interacts_with_entity __on_player_attacks_entity __on_player_starts_sneaking __on_player_stops_sneaking __on_player_starts_sprinting __on_player_stops_sprinting __on_tick __on_tick_ender __on_tick_nether + $ + 00' 01\ 02' 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/scarpet/resources/editors/npp/scarpet_v1.5_notepad++.xml b/docs/scarpet/resources/editors/npp/scarpet_v1.5_notepad++.xml new file mode 100644 index 00000000..b013b24d --- /dev/null +++ b/docs/scarpet/resources/editors/npp/scarpet_v1.5_notepad++.xml @@ -0,0 +1,64 @@ + + + + + + + + 00// 01 02 03 04 + 0x + + + + + + + ; + - * / % ^ && || > >= < <= == != = += -> <> ! ~ , : + + ( + + ) + + + + + + + not fact rand sin cos tan asin acos atan atan2 sinh cosh tanh sec csc sech csch cot acot coth asinh acosh atanh rad deg log log10 log1p sqrt max min abs round floor ceil mandelbrot relu print return exit throw try l join split slice sort sort_key range m keys values pairs get put has delete var undef vars if loop map filter first all for while reduce outer type bool number str length rand sleep time profile_expr lower upper title + block pos pos_offset solid air liquid flammable transparent opacity blocks_daylight emitted_light light block_light sky_light see_sky hardness blast_resistance top loaded loaded_ep suffocates power ticks_randomly update block_tick random_tick set blocks_movement block_sound material map_colour property block_properties block_data place_item set_biome biome player spawn entity_id entity_list entity_area entity_selector query modify entity_event stack_limit item_category inventory_size inventory_has_items inventory_get inventory_set inventory_find inventory_remove drop_item scan volume neighbours rect diamond logger sound particle particle_line particle_rect run save tick_time game_tick current_dimension in_dimension plop harvest destroy schedule nbt create_marker remove_all_markers load_app_data store_app_data + euler pi null true false + x y z p + _ _i _a _x _y _z + global_ + __command __config __on_player_jumps __on_player_deploys_elytra __on_player_wakes_up __on_player_rides __on_player_uses_item __on_player_clicks_block __on_player_right_clicks_block __on_player_breaks_block __on_player_interacts_with_entity __on_player_attacks_entity __on_player_starts_sneaking __on_player_stops_sneaking __on_player_starts_sprinting __on_player_stops_sprinting __on_player_releases_item __on_player_finishes_using_item __on_player_drops_item __on_player_drops_stack __on_tick __on_tick_ender __on_tick_nether + $ + 00' 01\ 02' 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/scarpet/resources/editors/npp/scarpet_v1.6_notepad++.xml b/docs/scarpet/resources/editors/npp/scarpet_v1.6_notepad++.xml new file mode 100644 index 00000000..d8058d2d --- /dev/null +++ b/docs/scarpet/resources/editors/npp/scarpet_v1.6_notepad++.xml @@ -0,0 +1,64 @@ + + + + + + + + 00// 01 02 03 04 + 0x + + + + + + + ; + - * / % ^ && || > >= < <= == != = += -> <> ! ~ , : + + ( + + ) + + + + + + + not fact rand sin cos tan asin acos atan atan2 sinh cosh tanh sec csc sech csch cot acot coth asinh acosh atanh rad deg log log10 log1p sqrt max min abs round floor ceil mandelbrot relu print return exit throw try l join split slice sort sort_key range m keys values pairs copy get put has delete var undef vars if loop map filter first all for while reduce continue break call outer type bool number str length rand sleep time profile_expr lower upper title replace replace_first + block pos pos_offset solid air liquid flammable transparent opacity blocks_daylight emitted_light light block_light sky_light see_sky hardness blast_resistance top loaded suffocates power ticks_randomly update block_tick random_tick set blocks_movement block_sound material map_colour property block_properties block_data place_item set_biome biome loaded_status generation_status chunk_tickets player spawn entity_id entity_list entity_area entity_selector query modify entity_event stack_limit item_category inventory_size inventory_has_items inventory_get inventory_set inventory_find inventory_remove drop_item scan volume neighbours rect diamond logger sound particle particle_line particle_rect run save tick_time game_tick current_dimension in_dimension plop harvest destroy schedule nbt create_marker remove_all_markers load_app_data store_app_data escape_nbt + euler pi null true false + x y z p + _ _i _a _x _y _z + global_ + __command __config __on_player_jumps __on_player_deploys_elytra __on_player_wakes_up __on_player_rides __on_player_uses_item __on_player_clicks_block __on_player_right_clicks_block __on_player_breaks_block __on_player_interacts_with_entity __on_player_attacks_entity __on_player_starts_sneaking __on_player_stops_sneaking __on_player_starts_sprinting __on_player_stops_sprinting __on_player_releases_item __on_player_finishes_using_item __on_player_drops_item __on_player_drops_stack __on_tick __on_tick_ender __on_tick_nether + $ + 00' 01\ 02' 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/carpet/script/value/ListValue.java b/src/main/java/carpet/script/value/ListValue.java index a4af06fd..2d1ac5dc 100644 --- a/src/main/java/carpet/script/value/ListValue.java +++ b/src/main/java/carpet/script/value/ListValue.java @@ -113,7 +113,7 @@ public class ListValue extends AbstractListValue implements ContainerValueInterf } else { - throw new InternalExpressionException("Cannot subtract two lists of uneven sizes"); + throw new InternalExpressionException("Cannot add two lists of uneven sizes"); } } else @@ -178,7 +178,7 @@ public class ListValue extends AbstractListValue implements ContainerValueInterf } else { - throw new InternalExpressionException("Cannot subtract two lists of uneven sizes"); + throw new InternalExpressionException("Cannot multiply two lists of uneven sizes"); } } else @@ -205,7 +205,7 @@ public class ListValue extends AbstractListValue implements ContainerValueInterf } else { - throw new InternalExpressionException("Cannot subtract two lists of uneven sizes"); + throw new InternalExpressionException("Cannot divide two lists of uneven sizes"); } } else