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

Update doc

This commit is contained in:
Étienne Fildadut 2021-12-12 15:52:23 +01:00
parent bb45cc8fdd
commit ec8a928272
4 changed files with 22 additions and 19 deletions

6
API.md Normal file
View file

@ -0,0 +1,6 @@
Lua API reference
=================
We actively support LuaJIT and Lua 5.4. Lua 5.1, 5.2 and 5.3 *should* work but I don't always test against them.
TODO see anselme.lua, it is reasonably commentated and we should probably generate some documentation using LDoc.

View file

@ -1,8 +1,5 @@
Anselme reference
=================
Language reference
------------------
Anselme language reference
==========================
### Main structure
@ -940,13 +937,8 @@ This only works on strings:
Variables for default types (each is associated to a string of the internal variable type name): `nil`, `number`, `string`, `list`, `pair`, `function reference`, `variable reference`.
#### Built-in languages
#### Built-in language scripts
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
-------------
TODO see anselme.lua

View file

@ -68,4 +68,6 @@ TODO: stupidly complex script
Reference
------------------
See [REFERENCE.md](REFERENCE.md).
See [LANGUAGE.md](LANGUAGE.md) for a reference of the language.
See [API.md](API.md) for the Lua API's documentation.

View file

@ -1,6 +1,6 @@
-- anselme module
local anselme = {
-- version
--- version
-- save is incremented a each update which may break save compatibility
-- language is incremented a each update which may break script file compatibility
-- api is incremented a each update which may break Lua API compatibility
@ -9,7 +9,7 @@ local anselme = {
language = 21,
api = 4
},
-- version is incremented at each update
--- version is incremented at each update
version = 22,
--- currently running interpreter
running = nil
@ -63,11 +63,12 @@ end
--- interpreter methods
local interpreter_methods = {
-- interpreter state
--- interpreter state
-- for internal use, you shouldn't touch this
state = nil,
-- VM this interpreter belongs to
--- VM this interpreter belongs to
vm = nil,
-- event that stopped the interpreter
--- event that stopped the interpreter
end_event = nil,
--- run the VM until the next event
@ -211,10 +212,12 @@ interpreter_methods.__index = interpreter_methods
--- vm methods
local vm_mt = {
-- anselme state
--- anselme state
-- for internal use, you shouldn't touch this
state = nil,
-- loaded game state
--- loaded game state
-- for internal use, you shouldn't touch this
game = nil,
--- wrapper for loading a whole set of scripts