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

28 commits

Author SHA1 Message Date
e9606cdee0 Add text buffer syntax 2022-09-27 17:05:06 +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
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
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
3e658e4780 Add variable constraints, rename type annotation checks to constraints, rename custom type to annotation 2022-09-08 21:28:27 +09:00
933e8fb0ee Add "function return" and "scoped function return" injections, allow children for return lines 2022-01-16 15:32:59 +01:00
88157b04b9 Merge behavior of : and = into single = operator for pairs; add assignment with _._ operator in function references 2021-12-14 02:37:09 +01:00
48cabbf4c0 Add while loop line and operator 2021-12-12 20:49:48 +01:00
f5382d2912 Add _; 2021-12-12 16:31:19 +01:00
acb8945dec Add variable reference and use them in alias(ref, id) 2021-12-09 14:34:21 +01:00
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
6e5cbf9e7e Add function references 2021-12-04 18:20:32 +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
f2e74c94c9 Changed a few things
* Integrated # and ~ decorators into the expression system. Created associated operators.
* # and ~ decorators only affect their current line. That's more useful...
* Fix our priority system to evaluate left-to-right instead of right-to-left (if there was a reason why I did it this way initially, I don't remember it so ¯\_(ツ)_/¯)
* a lotta internal changes

Various other small adjustments, see the diff of REFERENCE.md for details.
2021-11-28 01:43:54 +01: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
151c70ed26 Add default and named arguments, rename equality operator to ==, shortcut for string pairs 2021-04-25 18:40:45 +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
51e8c82181 Improve alias system 2021-04-08 16:34:33 +02:00
eb6da84878 Condition line -> expression line 2021-04-08 13:21:47 +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