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

251 commits

Author SHA1 Message Date
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
14d348bad9 Untypo 2021-11-27 14:37:55 +01:00
12d2aa3e82 Move reference into separate file 2021-11-27 14:31:54 +01:00
b9b59547ff More configurable handling of whitespace before decorators 2021-11-27 14:29:29 +01:00
e2b95b751b Switch a few remaining variables to snake_case 2021-11-27 13:17:29 +01:00
7433d27da5 Don't expose private event fields to user in choices 2021-11-27 13:10:36 +01:00
7105b445ef Handle events in text interpolation; capture text events in choice lines; improve test script 2021-11-26 21:26:41 +01:00
633f7b2d61 Prevent from restarting interpreter after return or error 2021-06-05 22:38:02 +02:00
c847fefd39 Parser only change state on success 2021-06-05 21:34:12 +02:00
0e755ea841 Add anselme version check in game config, rename version to "game version" 2021-06-05 17:26:15 +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
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
b7f38a16fd Commit on script end 2021-04-14 00:48:07 +02:00
977aa5dadd Don't commit on function call 2021-04-12 17:41:17 +02:00
e454888b9f Discard returns values from choices 2021-04-12 17:36:18 +02:00
f9edaff7e7 Restore tags when resuming from a checkpoint; simply resuming code 2021-04-12 17:08:35 +02:00
5c3e9d2c5d Preserve tags in choices children 2021-04-12 01:58:10 +02:00
b9c6d1d704 Add nil expression and fix return behavior with nil expression 2021-04-12 01:10:42 +02:00
6488bef75c Bump version 2021-04-10 14:48:22 +02:00
c6dc614c32 Only check for major version number when loading saves; don't save undefined arguments 2021-04-10 14:48:00 +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
f93d6fab6b Use love.filesystem instead of io.open to read files if running inside Löve
Also small improvement to error reporting
2021-04-09 18:12:11 +02:00
0df120eeaf Allow parameters alias 2021-04-08 18:19:43 +02:00
25ded7a3c8 Bump version, move TODO to notes.txt 2021-04-08 18:02:18 +02:00
9d4e732034 Typo 2021-04-08 17:25:58 +02:00
32ae99e33b Add :loadgame 2021-04-08 17:25:50 +02:00
51e8c82181 Improve alias system 2021-04-08 16:34:33 +02:00
b0d7a0bfb5 Check identifier pattern in more cases while parsing 2021-04-08 13:22:26 +02:00
eb6da84878 Condition line -> expression line 2021-04-08 13:21:47 +02:00
e1b0b17fc6 Remove temporary test script 2021-04-04 20:33:15 +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
6dc0db71e0 README part 2 2021-04-04 19:34:46 +02:00
a5de02ccb1 README first draft 2021-02-18 19:06:57 +01: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
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
7a5a05ff34 Improve loaddirectory 2019-12-28 15:26:48 +01:00
e69b99e2a7 Add interrupt events 2019-12-26 22:00:40 +01:00
4d38e0afc2 Clean README 2019-12-25 16:09:38 +01:00