mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Update notes
This commit is contained in:
parent
90e5a2d9cf
commit
02d50fb79f
2 changed files with 46 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
local eval
|
local eval
|
||||||
local truthy, merge_state, escape, get_variable, eval_text_callback, tags, events
|
local truthy, merge_state, escape, get_variable, tags, events
|
||||||
local run_line, run_block
|
local run_line, run_block
|
||||||
|
|
||||||
-- returns var in case of success and there is a return
|
-- returns var in case of success and there is a return
|
||||||
|
|
@ -206,7 +206,7 @@ local interpreter = {
|
||||||
package.loaded[...] = interpreter
|
package.loaded[...] = interpreter
|
||||||
eval = require((...):gsub("interpreter$", "expression"))
|
eval = require((...):gsub("interpreter$", "expression"))
|
||||||
local common = require((...):gsub("interpreter$", "common"))
|
local common = require((...):gsub("interpreter$", "common"))
|
||||||
truthy, merge_state, tags, get_variable, eval_text_callback, events = common.truthy, common.merge_state, common.tags, common.get_variable, common.eval_text_callback, common.events
|
truthy, merge_state, tags, get_variable, events = common.truthy, common.merge_state, common.tags, common.get_variable, common.events
|
||||||
escape = require((...):gsub("interpreter%.interpreter$", "parser.common")).escape
|
escape = require((...):gsub("interpreter%.interpreter$", "parser.common")).escape
|
||||||
|
|
||||||
return interpreter
|
return interpreter
|
||||||
|
|
|
||||||
44
notes.txt
44
notes.txt
|
|
@ -41,6 +41,50 @@ Reserved symbols that are still not used as a line type: `^+-=</[]*{}|\_!?.,;)"&
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
|
|
||||||
|
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: the function decorator feels a bit glued-on to the current syntax
|
||||||
|
|
||||||
|
TODO: simplify language, it is much too complicated. Less line types? (var def, func, checkpoint, tag). Rewrite some ad hoc syntax using the expression system?
|
||||||
|
|
||||||
|
TODO: functions/checkpoint: separate from scoping and/or actual functions?
|
||||||
|
|
||||||
|
TODO: fn/checkpoint/tag: maybe consider them a regular func call that takes children as arg; can keep compatibility using $/§ as shortcut for the actual call.
|
||||||
|
would allow more flexibility esp. for tags...
|
||||||
|
a func def would be:
|
||||||
|
|
||||||
|
:a
|
||||||
|
stuff
|
||||||
|
|
||||||
|
but then args?
|
||||||
|
|
||||||
|
:a = $(args)
|
||||||
|
stuff
|
||||||
|
|
||||||
|
how are children passed on? overloading?
|
||||||
|
|
||||||
|
if not possible, at least make checkpoint or fn defined using the other or some superset... -> checkpoints defined using fn
|
||||||
|
|
||||||
|
OK for tag though: pushtag/poptag fn:
|
||||||
|
|
||||||
|
# color:red
|
||||||
|
a
|
||||||
|
|
||||||
|
translate to
|
||||||
|
|
||||||
|
~ tag.push(color:red)
|
||||||
|
a
|
||||||
|
~ tag.pop()
|
||||||
|
|
||||||
|
TODO: perform seen/reached/etc default variable not in interpreter but using parse-time macro
|
||||||
|
|
||||||
|
TODO: no function call without () (reference to fn instead?). Fn could be stored in save but replaced with new versions on code reload... -> how to track these references?
|
||||||
|
if we make fn first class this means anonymous fn, is it ok?
|
||||||
|
|
||||||
|
TODO: make language simple enough to be able to reimplement it in, say, nim. Especially the interpreter (we could precompile a lot of stuff...)
|
||||||
|
|
||||||
TODO: test reacheability of script paths
|
TODO: test reacheability of script paths
|
||||||
|
|
||||||
TODO: redisign the checkpoint system to work better when used with parallel scripts (if both change the same variable, will be overwritten)
|
TODO: redisign the checkpoint system to work better when used with parallel scripts (if both change the same variable, will be overwritten)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue