1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 08:39:30 +00:00
Commit graph

12 commits

Author SHA1 Message Date
64bc85741a Changed a few things
- Bumped to 0.15.0
- Add boot script
- Change variable definition syntax, using a = to distinguish more cleary between identifier and value
- Variables initial values are evaluated on first use instead of at parsing time
- Error on variable redefinition. Means you should make sure to load saves after your scripts.
- Improve string parsing, support for escape codes
- Remove support for number literals with empty decimal part (42. for 42.0) as there's no distinction in Anselme and it conflicts with .function call suffix
- Changed priority of : pair operator
- Add type type, and type annotations to variables and function parameters
- Change Lua function system to use regular Anselme functions
  - Defining a function from Lua is now way simpler and require providing a full Anselme function signature
- Change Anselme function system
  - Dynamic dispatch, based on arity, type annotation and parameter names. Will select the most specific function at runtime.
  - Define way to overload most operators
  - Allow custom type to text formatters
  - Allow assignment to custom functions
  - Index operator ( renamed to ()
  - Functions with parameters each have their own private namespace (scoping ersatz)
  - Internal: "custom"-mode operators now have their own expression AST type instead of cluttering the function system
- Remove static type checker as it is barely useful with new function system. May or may not rewrite one in the future.
- Improve error messages here and there
- Internal: cleaning
2021-06-03 15:29:25 +02:00
151c70ed26 Add default and named arguments, rename equality operator to ==, shortcut for string pairs 2021-04-25 18:40:45 +02:00
17751c5c59 Rename checkpoint variable, add reached variable for checkpoints 2021-04-23 17:39:51 +02:00
0171d92352 Decorator system simplification, removed paragraph decorators, added function decorators 2021-04-23 17:13:39 +02:00
6f564ea0e2 Improve naming consistency
expression/conditions -> conditions
paragraphs/checkpoints -> checkpoints
merge/flush/commit -> merge
2021-04-23 02:27:06 +02:00
977aa5dadd Don't commit on function call 2021-04-12 17:41:17 +02:00
f9edaff7e7 Restore tags when resuming from a checkpoint; simply resuming code 2021-04-12 17:08:35 +02:00
b9c6d1d704 Add nil expression and fix return behavior with nil expression 2021-04-12 01:10:42 +02:00
dde89502da Fix a lot of issues when resuming from a paragraph in a choice or expression block 2021-04-10 14:33:32 +02:00
ec18d2e611 Recursively check equality for lists and pairs, improve function redefinition error message 2021-04-04 19:36:42 +02:00
a6c4eee4b3 Show source file in error messages 2020-09-18 23:59:22 +02:00
b233d7fa1e Rewrite 2020-05-24 20:31:09 +02:00