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

21 commits

Author SHA1 Message Date
9bd9759115 Rename overloaded operators (add underscores)
* add suffix unary operators
* add _! operator
* _._ and _&_ operator overloading
* allow calling function references with _! and access variables with _._
* rename . method operator to !
* various cleaning & improvements

Documentation will follow at some point.
2021-12-06 01:45:19 +01:00
d5b1a9f225 Allow argument-less calling using ! suffix 2021-12-04 18:51:09 +01:00
6e5cbf9e7e Add function references 2021-12-04 18:20:32 +01:00
0f89307d5f Cache read values in local state, handle mutable variables properly 2021-12-02 23:57:25 +01:00
607313d5ce Merge state on vm:eval, new aliases need to be merged 2021-12-02 19:24:48 +01:00
721464218c Add eventbuffer type 2021-12-02 18:39:43 +01:00
38b2a6ae69 Improve function decorator parsing 2021-11-28 16:23:44 +01:00
633f7b2d61 Prevent from restarting interpreter after return or error 2021-06-05 22:38:02 +02:00
d42c35facd Change versioning to separate language/API/save; allow executing blocks directly; add version to game config 2021-06-05 17:19:42 +02:00
9388a22a0f Move default variables alias from game config to language file 2021-06-05 14:01:54 +02:00
61e3143e9e Add alias() to define alias after definition; add frFR language file 2021-06-05 01:30:40 +02:00
198c06e2e8 Rename format to {} 2021-06-05 00:06:00 +02:00
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
4b139019c9 Add list assignment operators 2021-04-25 19:10:37 +02:00
b93061143c Add name and value pair methods 2021-04-25 18:46:22 +02:00
151c70ed26 Add default and named arguments, rename equality operator to ==, shortcut for string pairs 2021-04-25 18:40:45 +02:00
9028970440 Fix + operator overloading 2021-04-04 20:29:22 +02:00
ec18d2e611 Recursively check equality for lists and pairs, improve function redefinition error message 2021-04-04 19:36:42 +02:00
861330475e Fix empty list conversion to lua 2021-02-18 17:37:49 +01:00
14ba34f8fd Annoying typo 2021-02-18 17:10:34 +01:00
b233d7fa1e Rewrite 2020-05-24 20:31:09 +02:00