mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
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.
This commit is contained in:
parent
14d348bad9
commit
f2e74c94c9
31 changed files with 894 additions and 343 deletions
|
|
@ -55,10 +55,11 @@ local function parse(state)
|
|||
state.variables[line.fqm].value.expression = line.expression
|
||||
end
|
||||
end
|
||||
-- text
|
||||
-- text (text & choice lines)
|
||||
if line.text then
|
||||
local txt, err = parse_text(line.text, state, namespace)
|
||||
if err then return nil, ("%s; at %s"):format(err, line.source) end
|
||||
local txt, err = parse_text(line.text, state, namespace, "#~", true)
|
||||
if not txt then return nil, ("%s; at %s"):format(err, line.source) end
|
||||
if err:match("[^%s]") then return nil, ("expected end of expression in end-of-text expression before %q"):format(err) end
|
||||
line.text = txt
|
||||
end
|
||||
state.queued_lines[i] = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue