diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-05 15:45:46 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-05 15:45:46 -0800 |
| commit | 2df539a76293f028077abd81e75bbfa9b510ae07 (patch) | |
| tree | 596406142ede0e24bc52ac980e8790593137fb2a /lib/operators.nom | |
| parent | 139bd76efc5758c1826cd89fcfd65e55e6416ec9 (diff) | |
More cleanup of vars.XX -> \%XX
Diffstat (limited to 'lib/operators.nom')
| -rw-r--r-- | lib/operators.nom | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/operators.nom b/lib/operators.nom index 23de2b3..9250214 100644 --- a/lib/operators.nom +++ b/lib/operators.nom @@ -62,7 +62,7 @@ lua do> ".." nomsu_alias, op = unpack(op); end nomsu:defmacro("%a "..nomsu_alias.." %b", (function(nomsu, vars) - return "("..nomsu:tree_to_lua(vars.a).." "..op.." "..nomsu:tree_to_lua(vars.b)..")"; + return "("..nomsu:tree_to_lua(\%a).." "..op.." "..nomsu:tree_to_lua(\%b)..")"; end), [["(\\%a ]]..op..[[ \\%b)"]]); end @@ -112,7 +112,7 @@ lua do> ".." -- Chained comparisons need to be functions to avoid re-evaluating their arguments : nomsu:def(spec, function(nomsu, vars) for i,op in ipairs(chain) do - local a, b, result = vars[i], vars[i+1]; + local a, b, result = vars[tostring(i)], vars[tostring(i+1)]; if op == "<" then; result = a < b; elseif op == "<=" then; result = a <= b; elseif op == ">" then; result = a > b; |
