diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml old mode 100644 new mode 100755 diff --git a/args.mers b/args.mers deleted file mode 100644 index e1e1410..0000000 --- a/args.mers +++ /dev/null @@ -1 +0,0 @@ -args.debug() diff --git a/docs/builtins.md b/docs/builtins.md old mode 100644 new mode 100755 diff --git a/docs/intro.md b/docs/intro.md old mode 100644 new mode 100755 diff --git a/docs/statements.md b/docs/statements.md old mode 100644 new mode 100755 diff --git a/docs/syntax_cheat_sheet.md b/docs/syntax_cheat_sheet.md old mode 100644 new mode 100755 diff --git a/examples/advent_of_code/2022/day3a.mers b/examples/advent_of_code/2022/day3a.mers old mode 100644 new mode 100755 diff --git a/examples/advent_of_code/2022/day3b.mers b/examples/advent_of_code/2022/day3b.mers old mode 100644 new mode 100755 diff --git a/examples/advent_of_code/2022/day4a.mers b/examples/advent_of_code/2022/day4a.mers old mode 100644 new mode 100755 diff --git a/examples/advent_of_code/2022/day4b.mers b/examples/advent_of_code/2022/day4b.mers old mode 100644 new mode 100755 diff --git a/examples/amogus.mers b/examples/amogus.mers old mode 100644 new mode 100755 diff --git a/examples/custom_type.mers b/examples/custom_type.mers old mode 100644 new mode 100755 diff --git a/examples/destructuring_assignment.mers b/examples/destructuring_assignment.mers old mode 100644 new mode 100755 diff --git a/examples/force_output_type.mers b/examples/force_output_type.mers old mode 100644 new mode 100755 diff --git a/examples/functions_double_definitions.mers b/examples/functions_double_definitions.mers old mode 100644 new mode 100755 diff --git a/examples/get_ref.mers b/examples/get_ref.mers old mode 100644 new mode 100755 diff --git a/examples/iterators.mers b/examples/iterators.mers old mode 100644 new mode 100755 diff --git a/examples/macro.mers b/examples/macro.mers old mode 100644 new mode 100755 diff --git a/examples/modify_variable.mers b/examples/modify_variable.mers old mode 100644 new mode 100755 diff --git a/examples/my_macro.mers b/examples/my_macro.mers old mode 100644 new mode 100755 diff --git a/examples/struct_fields.mers b/examples/struct_fields.mers old mode 100644 new mode 100755 diff --git a/examples/switch_match.mers b/examples/switch_match.mers old mode 100644 new mode 100755 diff --git a/examples/the_any_type.mers b/examples/the_any_type.mers old mode 100644 new mode 100755 diff --git a/examples/thread.mers b/examples/thread.mers old mode 100644 new mode 100755 diff --git a/external.css b/external.css old mode 100644 new mode 100755 diff --git a/index.html b/index.html old mode 100644 new mode 100755 diff --git a/mers/src/lang/fmtgs.rs b/mers/src/lang/fmtgs.rs old mode 100644 new mode 100755 diff --git a/mers/src/lang/global_info.rs b/mers/src/lang/global_info.rs index 1063c93..c9df2fc 100755 --- a/mers/src/lang/global_info.rs +++ b/mers/src/lang/global_info.rs @@ -113,6 +113,22 @@ impl GlobalScriptInfo { .map(|(i, v)| (v.to_string(), i)) .collect() } + pub fn set_main_fn_args(&mut self, args: Vec<(String, VType)>) { + self.main_fn_args = args; + } + #[allow(unused)] + pub fn add_enum_variant(&mut self, name: String) -> usize { + let id = self.enum_variants.len(); + self.enum_variants.insert(name, id); + id + } + #[allow(unused)] + pub fn add_custom_type(&mut self, name: String, t: VType) -> usize { + let id = self.custom_types.len(); + self.custom_types.push(t); + self.custom_type_names.insert(name, id); + id + } } #[derive(Debug)] diff --git a/mers/src/lang/mod.rs b/mers/src/lang/mod.rs old mode 100644 new mode 100755 diff --git a/mers/src/libs/comms.rs b/mers/src/libs/comms.rs old mode 100644 new mode 100755 diff --git a/mers/tests/destructuring_assignment.mers b/mers/tests/destructuring_assignment.mers old mode 100644 new mode 100755 diff --git a/mers/tests/force_output_type.mers b/mers/tests/force_output_type.mers old mode 100644 new mode 100755 diff --git a/mers/tests/functions_double_definitions.mers b/mers/tests/functions_double_definitions.mers old mode 100644 new mode 100755 diff --git a/mers/tests/get_ref.mers b/mers/tests/get_ref.mers old mode 100644 new mode 100755 diff --git a/mers/tests/lib_comms.rs b/mers/tests/lib_comms.rs old mode 100644 new mode 100755 diff --git a/mers/tests/macro.mers b/mers/tests/macro.mers old mode 100644 new mode 100755 diff --git a/mers/tests/modify_variable.mers b/mers/tests/modify_variable.mers old mode 100644 new mode 100755 diff --git a/mers/tests/my_macro.mers b/mers/tests/my_macro.mers old mode 100644 new mode 100755 diff --git a/mers/tests/return_true.mers b/mers/tests/return_true.mers old mode 100644 new mode 100755 diff --git a/mers/tests/test_in_mers.rs b/mers/tests/test_in_mers.rs old mode 100644 new mode 100755 diff --git a/mers/tests/thread_NOCHECK_ONLY_COMPILE.mers b/mers/tests/thread_NOCHECK_ONLY_COMPILE.mers old mode 100644 new mode 100755 diff --git a/site/index.html b/site/index.html old mode 100644 new mode 100755 diff --git a/site/welcome.mers b/site/welcome.mers old mode 100644 new mode 100755