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

[language] replace constant symbols with a constant value check function

This commit is contained in:
Étienne Fildadut 2024-04-24 16:15:58 +02:00
parent b534a3c4a2
commit aaff625b6c
15 changed files with 31 additions and 37 deletions

View file

@ -172,7 +172,7 @@ Define a value in the global scope, converting it from Lua to Anselme if needed.
* for other lua values: `define("name", value)`
* for anselme AST: `define("name", value)`
`name` can be prefixed with symbol modifiers, for example ":name" for a constant variable.
`name` can be prefixed with symbol modifiers, for example "@name" for an exported variable.
If `raw_mode` is true, no anselme-to/from-lua conversion will be performed in the function.
The function will receive the state followed by AST nodes as arguments, and is expected to return an AST node.