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

211 commits

Author SHA1 Message Date
18dd3ad6bd Remove -> operator 2024-01-01 17:51:33 +01:00
1eceadafc6 Bump version
And happy new year.
2023-12-31 20:19:41 +01:00
861877503a Comments: switch from (( to /* delimiters
Double parentheses turned out to conflict too often with normal code. I guess sometimes I shouldn't try to make my own syntax up.
2023-12-31 19:54:54 +01:00
9e73269cda Update doc 2023-12-31 19:43:44 +01:00
43a745a7a9 Final test batch and associated fixes 2023-12-31 19:41:14 +01:00
050c84921c Add identifier wrap for aliases 2023-12-31 14:55:28 +01:00
409a2e7095 Firth test batch and associated fixes 2023-12-31 14:30:14 +01:00
aa8dfbd498 Fix interleaved text and choices 2023-12-31 14:25:37 +01:00
4125a4c99b Script/checkpoint system first draft 2023-12-31 00:47:55 +01:00
0a835a65d8 Fourth test batch 2023-12-30 23:45:30 +01:00
d928ff5598 Fix index with identifier conflicts with some syntaxes 2023-12-30 23:44:59 +01:00
b7761311fe Aliases: add wrap > operator 2023-12-30 23:44:42 +01:00
2cd910389b Exported variables: no longer add export scope to every function, allow freely access and modifiy variable in function scope
Too many issues with predefining exported variables, and this is more flexible.
2023-12-30 23:43:05 +01:00
0eea4b80a6 Third test batch 2023-12-30 23:39:10 +01:00
3edf65dc2a Exported variables predefinition: replace prepare system with generic resume system 2023-12-30 15:31:00 +01:00
e2ec105a4b Update readme 2023-12-30 02:09:24 +01:00
db8ae03927 Add test for constant aliases and text trailing space removal 2023-12-30 02:02:11 +01:00
bc41dd1dd2 Aliases: allow exported, non-call for constant variables 2023-12-30 01:59:15 +01:00
07cb44256c Change format_priority to a method 2023-12-30 01:35:58 +01:00
d42b900388 Text litteral: strip leading and closing space if present 2023-12-29 19:19:15 +01:00
5dd971ff8f Move anselme code into its own directory 2023-12-29 18:47:36 +01:00
404e7dd56e Replace AttachBlock with more generic PartialScope 2023-12-29 17:56:01 +01:00
9b7d1e436e Second test batch and associated fixes 2023-12-29 17:15:43 +01:00
7abb116876 Ignore defaults values in parameter type check 2023-12-28 18:51:40 +01:00
9acde377c2 Update docs 2023-12-28 17:42:14 +01:00
809613ef8b LuaJIT compatibility
Spoiler alert: Anselme run ~1.5x slower in LuaJIT than Lua 5.3/5.4. I didn't expected LuaJIT to be able to optimize anything with my super performant and cache friendly AST walker interpreter, but being this much slower is kinda impressive.
2023-12-28 17:37:57 +01:00
82ce53be83 First test batch and associated fixes
The test runner is also nicer to use.
2023-12-28 17:03:54 +01:00
10084dec23 Return break while loops 2023-12-28 14:51:55 +01:00
8eb4bd5ac5 Fix conflict between comparison & compound operators
Everyone makes mistakes.
2023-12-28 14:51:42 +01:00
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