Commit Graph

124 Commits

Author SHA1 Message Date
Moritz Hölting b2075f0504 improve debug formatting for Scope and FunctionData 2025-03-05 14:43:10 +01:00
Moritz Hölting 23b14d7667 rework annotations & transpile single int declarations without assignment 2025-02-27 22:03:45 +01:00
Moritz Hölting 9e652e7c85 change function transpilation to use scope instead of separate map 2025-02-26 13:05:59 +01:00
Moritz Hölting 9899b9add1 prepare transpiling variables 2025-02-25 22:52:39 +01:00
Moritz Hölting 4f31f08875 fix variable declaration parsing 2025-02-25 20:45:27 +01:00
Moritz Hölting 9d5c40f150 implement variable declaration parsing 2025-02-25 20:45:27 +01:00
Moritz Hölting fe293b2dc4 make serialization of source file thread local 2025-02-19 09:32:47 +01:00
Moritz Hölting f3f69faace Merge branch 'feature/macro-functions' into develop 2025-02-17 13:58:58 +01:00
Moritz Hölting 4a5f34a07b change back to derive (de-)serialize for Span 2025-02-16 20:41:20 +01:00
Moritz Hölting 572c68ca10 change order of serialization of Span by serializing to temporary buffer 2025-02-16 20:41:20 +01:00
Moritz Hölting b11f4d1caf implement custom deserialize
- requires opposite order of data and source_files than what is serialized
2025-02-16 20:41:20 +01:00
Moritz Hölting 5fbe40c41f implement custom serialize for Span 2025-02-16 20:41:20 +01:00
Moritz Hölting 346b97a58a update dependencies 2025-02-15 14:40:58 +01:00
Moritz Hölting a99a155d76 fix compilation errors depending on feature selection and update dependency version 2025-01-17 12:27:25 +01:00
Moritz Hölting 3a423e1de5 remove unnecessary RwLocks in Transpiler 2024-11-15 10:42:52 +01:00
Moritz Hölting 95153f2912 unescape macro string contents 2024-11-15 10:33:55 +01:00
Moritz Hölting c0b266caca allow passing in parameters to functions that will be used as macros 2024-11-12 14:40:40 +01:00
Moritz Hölting 134f181635 show multiple errors and mark tick/load annotation incompatible with parameters 2024-11-11 23:19:36 +01:00
Moritz Hölting c880b58f64 require macros to be present in function parameters 2024-11-11 22:54:24 +01:00
Moritz Hölting 550459922d implement first version of macros 2024-11-10 16:04:10 +01:00
Moritz Hölting 09400afa13 remove debug statement in lua handling 2024-11-09 15:24:58 +01:00
Moritz Hölting 320eef8ed7 update mlua to 0.10.0 2024-10-30 20:44:05 +01:00
Moritz Hölting f7414ad23f use full hash length as name, improve docs 2024-09-27 16:26:24 +02:00
Moritz Hölting 973e6c2c1f update shulkerbox dependency 2024-09-22 13:33:00 +02:00
Moritz Hölting 1f4cad5634 implement tag declaration 2024-09-21 22:45:05 +02:00
Moritz Hölting 536c8479aa implement error on conflicting function names and deterministic function generation order 2024-09-20 16:50:40 +02:00
Moritz Hölting 01a2d66503 improve lua integration by allowing more flexible return types and introducing globals 2024-09-20 14:55:48 +02:00
Moritz Hölting 9581da3c04 change return type of parse_* functions from Option to Result 2024-09-19 20:54:39 +02:00
Moritz Hölting 301ceb3efa improve error display 2024-09-19 00:12:24 +02:00
Moritz Hölting a2de2d7338 add source code display to UnexpectedExpression, LuaRuntimeError errors 2024-09-03 22:21:03 +02:00
Moritz Hölting 6094fc0df3 extend file provider with read_bytes method and return cow 2024-09-01 22:41:43 +02:00
Moritz Hölting 4efcb55d7c suggest similarly named functions if invoked function does not exist 2024-08-29 00:57:11 +02:00
Moritz Hölting befdc2bfd4 fix error on literal command directly after comment 2024-08-28 13:09:19 +02:00
Moritz Hölting 659683bd39 add SourceCodeDisplay to MissingFunctionDeclaration error 2024-08-27 22:55:26 +02:00
Moritz Hölting 4505def6c0 fix code error message not being displayed 2024-08-24 00:46:37 +02:00
Moritz Hölting 8953b347c5 fix different function signature of eval_string when lua is disabled 2024-08-23 23:56:10 +02:00
Moritz Hölting f73665d265 add code example to top level functions 2024-08-23 00:20:30 +02:00
Moritz Hölting 83d5f329f9 allow custom handlers instead of only printer 2024-08-23 00:06:58 +02:00
Moritz Hölting bc25da6f2c cleanup and correct string literal content implementation 2024-07-08 15:03:09 +02:00
Moritz Hölting a0a27cda96 add argument for transpiling pack_format 2024-06-24 21:49:51 +02:00
Moritz Hölting 398fce2bd6 add some integration tests 2024-06-24 21:37:02 +02:00
Moritz Hölting af544ac79e implement file provider for working without file systems 2024-06-21 19:22:24 +02:00
Moritz Hölting b428c64f89 more ergonomic receive function of handler 2024-06-21 10:09:30 +02:00
Moritz Hölting dd79541ae9 add tracing crate for logging 2024-06-15 21:49:05 +02:00
Moritz Hölting 899a973315 implement from-import statement 2024-06-12 18:09:32 +02:00
Moritz Hölting deddf1d77e fix problem with missing function generations when functions have same name in different files 2024-06-10 20:32:10 +02:00
Moritz Hölting 5a27787679 extract top level public functions to reuse parts of each other 2024-06-10 08:41:24 +02:00
Moritz Hölting de285639a2 implement transpile function for multiple script paths 2024-06-09 21:22:48 +02:00
Moritz Hölting e80809b3f9 Implement public keyword for functions 2024-06-09 17:59:56 +02:00
Moritz Hölting f00302c8af Fix unexpected whitespace in condition error 2024-04-13 13:41:24 +02:00
Moritz Hölting 2bac397096 implement remaining execute operators 2024-04-09 21:25:19 +02:00
Moritz Hölting a818325ce9 Implement execute blocks
- move conditionals to execute blocks
- implement "as" in execute blocks
2024-04-09 20:42:11 +02:00
Moritz Hölting 30bfdaf0a6 Add path-absolutize crate for absolute path conversion 2024-04-09 11:40:43 +02:00
Moritz Hölting 8b6fc24759 Implement better SourceCodeDisplay output 2024-04-08 14:03:26 +02:00
Moritz Hölting e0d913612b Box lua code and switch to lua-jit 2024-04-07 21:12:47 +02:00
Moritz Hölting b105a45154 Introduce namespace configuration syntax 2024-04-06 21:49:25 +02:00
Moritz Hölting 01040964af Add Lua support to transpiler 2024-04-06 17:23:20 +02:00
Moritz Hölting 9f8b31e2aa Add 'Run' statement to grammar and syntax tree 2024-04-06 15:12:20 +02:00
Moritz Hölting c770a54517 Re-export shulkerbox module and update error message in transpiler 2024-04-06 14:42:44 +02:00
Moritz Hölting 3c3c9e5b24 Add serde dependency and derive serialization and deserialization for relevant structs 2024-04-06 14:40:44 +02:00
Moritz Hölting 34076f9842 Update TranspileError enum and add TranspileResult type 2024-04-06 14:30:11 +02:00
Moritz Hölting c4023e0b64 Transpile functions based on annotations 2024-04-06 13:26:34 +02:00
Moritz Hölting 42503bdc78 Always transpile function when annotated with tick or load 2024-04-06 12:47:15 +02:00
Moritz Hölting 62dd12cab3 implement function calls 2024-04-05 16:16:12 +02:00
Moritz Hölting 2ed6e56ef1 Refactor transpile module and error handling 2024-04-05 12:59:21 +02:00
Moritz Hölting 4b52985992 Implement conditional operators 2024-04-03 13:46:57 +02:00
Moritz Hölting 9159c8222e Rename compiler to transpiler and implement load and tick annotation for main function 2024-04-03 01:27:02 +02:00
Moritz Hölting ced609265c Add support for grouping statements 2024-04-03 01:09:13 +02:00
Moritz Hölting dc288588c8 Add support for doc comments 2024-04-03 00:45:34 +02:00
Moritz Hölting b9bc5438e5 Implement annotations for functions 2024-04-01 20:42:38 +02:00
Moritz Hölting d4305b3629 Basic implementation of if/else without conditional operators 2024-03-29 18:26:43 +01:00
Moritz Hölting 0d93faf87f Add ShulkerScript basic compiler for only main function and literal commands 2024-03-28 01:17:17 +01:00
Moritz Hölting 9d24571b40 Add parser for syntax tree 2024-03-27 21:39:56 +01:00
Moritz Hölting 830b3b10d9 Add tokenizing module 2024-03-27 19:27:11 +01:00