1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00
Commit graph

232 commits

Author SHA1 Message Date
a7f2362199 Typed swap value & type order 2023-12-28 14:30:28 +01:00
507dd5930e Translation template generator first draft 2023-12-28 14:28:59 +01:00
91e1311560 Custom format for Typed and dispatch refactor 2023-12-28 14:28:14 +01:00
e222f0fb28 Constant aliases 2023-12-28 13:05:52 +01:00
f574e6a775 Allow no expression in return 2023-12-28 13:04:53 +01:00
53c1c764ba Add testing framework
More tests will arrive shortly...
2023-12-28 13:03:56 +01:00
e71bff9562 Replace persistent variable system
Previous system linked the variable name with the saved value, meaning the variable could not be renamed or moved outside the global scope.

Instead we propose to store all persistent values in a global table, identifying each by a key. To still allow nice manipulation with identifiers, the alias syntax replace the persistent syntax for symbols - an aliases symbol will act as if a function call was used in place of the identifier when it appear.
2023-12-27 21:25:14 +01:00
56ed6c912b Replace checkpoint system
The previous system needed to store of the scope and full AST to build a Resumable object, which means that if persisted, updating the resumable script will have no effect.
The new system instead uses an anchor token and does not require any information besides the anchor name.
2023-12-27 17:06:35 +01:00
c4636343b4 Translation system first draft 2023-12-26 20:03:06 +01:00
ffadc0dd69 ArgumentTuple cleanup 2023-12-23 21:07:44 +01:00
fe351b5ca4 Anselme v2.0.0-alpha rewrite
Woke up and felt like changing a couple things. It's actually been worked on for a while, little at a time...

The goal was to make the language and implementation much simpler. Well I don't know if it really ended up being simpler but it sure is more robust.

Main changes:
* proper first class functions and closures supports! proper scoping rules! no more namespace shenanigans!
* everything is an expression, no more statements! make the implementation both simpler and more complex, but it's much more consistent now! the syntax has massively changed as a result though.
* much more organized and easy to modify codebase: one file for each AST node, no more random fields or behavior set by some random node exceptionally, everything should now follow the same API defined in ast.abstract.Node

Every foundational feature should be implemented right now. The vast majority of things that were possible in v2 are possible now; some things aren't, but that's usually because v2 is a bit more sane.
The main missing things before a proper release are tests and documentation. There's a few other things that might be implemented later, see the ideas.md file.
2023-12-22 13:25:28 +01:00
2ff494d108 Clean implementation of 👁️ and no longer increment 🏁 on checkpoint execution (redundant with 👁️) 2023-03-02 15:49:15 +09:00
f79e2f5716 Code style cleaning 2022-10-03 14:43:48 +09:00
f37fbb7594 Bump version 2022-09-28 18:44:06 +09:00
5e441886c0 Add anonymous functions 2022-09-28 14:56:31 +09:00
2c6d66c222 Variable must now be explicitly marked as persistent 2022-09-27 19:27:23 +09:00
e9606cdee0 Add text buffer syntax 2022-09-27 17:05:06 +09:00
ccaa40a99d Add rounding functions 2022-09-17 01:36:01 +09:00
e017a391ec Separate function and class injections 2022-09-16 21:55:06 +09:00
c43266260d Fix _._ operator not working with arbitrary expressions 2022-09-16 21:40:45 +09:00
f0ecfbb43b Update builtin scripts 2022-09-16 20:23:01 +09:00
fe897688d6 Bump version 2022-09-16 16:40:13 +09:00
ef5e1a577f Re-add alternative : operator for pairs 2022-09-16 14:19:48 +09:00
4284b06f10 Allow any character to be escaped 2022-09-14 15:42:02 +09:00
d1f49d1894 Preprend every definition line type with a colon, remove function decorator, add immediately ran definition line 2022-09-14 15:28:58 +09:00
7b756ad092 Update README, bump version 2022-09-13 19:34:34 +09:00
1263c32572 Implicitly call references like functions 2022-09-10 17:58:34 +09:00
95462391e3 Add maps; remove map emulation functionality from list; function and tags now internally use maps instead of lists 2022-09-09 21:39:37 +09:00
bac5cdde01 Change equality test to reference comparison for mutable values 2022-09-09 14:57:31 +09:00
b50d783928 Also copy keys when copying variables 2022-09-09 12:19:50 +09:00
95683a0ffd Add constants 2022-09-08 22:09:11 +09:00
3e658e4780 Add variable constraints, rename type annotation checks to constraints, rename custom type to annotation 2022-09-08 21:28:27 +09:00
92a496e584 Style cleanup in interpreter.expression 2022-06-13 00:17:24 +09:00
4ac0d3f8f7 Update documentation 2022-06-09 18:10:17 +09:00
47f95fc04a Add object type, dot operator can return function references 2022-06-09 17:07:58 +09:00
69b9e17020 Updated documentation; added Lua API documentation 2022-01-20 01:49:52 +01:00
933e8fb0ee Add "function return" and "scoped function return" injections, allow children for return lines 2022-01-16 15:32:59 +01:00
b60f53df01 Improve variable redefinition error 2022-01-16 02:34:25 +01:00
eb3a1d3f2c Fix functions defined in code injection conflict due to reference reuse 2022-01-16 02:33:53 +01:00
b89095bbd2 Change priority of _~?_, _~_, and _#_ 2022-01-16 00:35:52 +01:00
dc0b8f627c Update documentation 2022-01-16 00:23:32 +01:00
f05ccdffcc Fix _!_ binop call with more than 2 arguments 2022-01-16 00:19:25 +01:00
86862be9f5 Change _=_ pair operator priority 2022-01-16 00:19:09 +01:00
311ff83d59 Change config.ans variables for games (add global directory, start expression, remove start script) 2022-01-16 00:18:20 +01:00
428042c5d9 Add scoped function injections 2022-01-16 00:17:23 +01:00
c4fb2649c2 Stdlib: add string!len, table!concat, _%_ 2022-01-16 00:16:06 +01:00
6a5595ca04 Define injections from a game config.ans 2022-01-15 02:48:53 +01:00
a56e159a7d Fix test error on LuaJIT due to Lua 5.4 change on double formatting 2022-01-14 23:49:22 +01:00
fdcea38e5e Update documentation 2022-01-14 23:43:20 +01:00
dfe838a769 Add custom code inject at function/checkpoint start/end 2022-01-14 23:27:21 +01:00