mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 08:39:30 +00:00
Bump version, update doc
This commit is contained in:
parent
04c6683de8
commit
037654ebcf
5 changed files with 36 additions and 25 deletions
|
|
@ -903,7 +903,13 @@ This only works on strings:
|
|||
|
||||
#### Built-in variables
|
||||
|
||||
TODO see stdlib/bootscript.lua
|
||||
Variables for default types (each is associated to a string of the internal variable type name): `nil`, `number`, `string`, `list`, `pair`, `function reference`.
|
||||
|
||||
#### Built-in languages
|
||||
|
||||
Anselme provides some scripts that define translated aliases for built-in variables and functions. Currently `enUS` (English) and `frFR` (French) are provided.
|
||||
|
||||
See the `stdlib/languages` for details on each language.
|
||||
|
||||
API reference
|
||||
-------------
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ local anselme = {
|
|||
-- api is incremented a each update which may break Lua API compatibility
|
||||
versions = {
|
||||
save = 1,
|
||||
language = 19,
|
||||
api = 3
|
||||
language = 20,
|
||||
api = 4
|
||||
},
|
||||
-- version is incremented at each update
|
||||
version = 20,
|
||||
version = 21,
|
||||
--- currently running interpreter
|
||||
running = nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@ Reserved symbols that are still not used as a line type: `^+-=</[]*{}|\_!?.,;)"&
|
|||
|
||||
Broad goals and ideas that may never be implemented. Mostly used as personal post-it notes.
|
||||
|
||||
TODO: some sensible way to capture text event in string litterals (string interpolation)?
|
||||
TODO: rewrite cycle, ... using function references
|
||||
|
||||
TODO: consider something like :identifier to create a string "identifier", might simplify the identifier=value special syntax and free up the = operator
|
||||
|
||||
TODO: some sensible way to capture text event in string litterals (string interpolation)? -> meh, this means we can capture choice events, and choice events contain their code block, and we don't want to store code blocks in the save file (as code can be updated/translated/whatever)
|
||||
|
||||
TODO: the function decorator feels a bit glued-on to the current syntax
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
local truthy, anselme, compare, is_of_type, identifier_pattern, format_identifier, find, get_variable
|
||||
|
||||
--- mark a table as modified, so it will be merged on the next checkpoint if it appears somewhere in a value
|
||||
local function mark_as_modified(v)
|
||||
local modified = getmetatable(anselme.running.state.variables).modified_tables
|
||||
table.insert(modified, v)
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
return [[
|
||||
(Types)
|
||||
~ "nil".alias("nul")
|
||||
~ "number".alias("nombre")
|
||||
~ "string".alias("texte")
|
||||
~ "list".alias("liste")
|
||||
~ "pair".alias("paire")
|
||||
~ "nil"!alias("nul")
|
||||
~ "number"!alias("nombre")
|
||||
~ "string"!alias("texte")
|
||||
~ "list"!alias("liste")
|
||||
~ "pair"!alias("paire")
|
||||
|
||||
(Built-in functions)
|
||||
(~ "alias".alias("alias")
|
||||
~ "name".alias("nom")
|
||||
~ "value".alias("valeur")
|
||||
~ "len".alias("longueur")
|
||||
~ "insert".alias("ajouter")
|
||||
~ "remove".alias("retirer")
|
||||
~ "find".alias("trouver")
|
||||
~ "error".alias("erreur")
|
||||
~ "rand".alias("aléa")
|
||||
~ "raw".alias("brut")
|
||||
(~ "type".alias("type")
|
||||
~ "is of type".alias("est de type")
|
||||
~ "cycle".alias("cycler")
|
||||
~ "random".alias("aléatoire")
|
||||
~ "next".alias("séquence")
|
||||
(~ "alias"!alias("alias")
|
||||
~ "name"!alias("nom")
|
||||
~ "value"!alias("valeur")
|
||||
~ "len"!alias("longueur")
|
||||
~ "insert"!alias("ajouter")
|
||||
~ "remove"!alias("retirer")
|
||||
~ "find"!alias("trouver")
|
||||
~ "error"!alias("erreur")
|
||||
~ "rand"!alias("aléa")
|
||||
~ "raw"!alias("brut")
|
||||
(~ "type"!alias("type")
|
||||
~ "is of type"!alias("est de type")
|
||||
~ "cycle"!alias("cycler")
|
||||
~ "random"!alias("aléatoire")
|
||||
~ "next"!alias("séquence")
|
||||
|
||||
(Built-in variables)
|
||||
:alias 👁️ = "vu"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue