aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-12-14 19:23:26 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-12-14 19:25:03 -0800
commit83a40b7493b19e4b55167784e073e92733344b87 (patch)
tree758bc8986c6985fad9aabfab5a713318ef180410 /core
parenta7adc8cbff9347606fc9c0e8d00d4af2b6b838f5 (diff)
Updating to support multiple method calls.
Diffstat (limited to 'core')
-rw-r--r--core/metaprogramming.nom3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index 77dbd24..9fcf26a 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -270,6 +270,9 @@ externally (%tree as lua expr) means:
..local tree_lua = compile(\%tree)
if \%tree.type == 'Block' then
tree_lua = LuaCode:from(\%tree.source, '(function()\\n ', tree_lua, '\\nend)()')
+ elseif \%tree.type == 'MethodCall' and #\%tree > 2 then
+ compile_error_at(\%tree, "This must be a single value instead of "..(#\%tree - 1).." method calls.",
+ "Replace this with a single method call.")
end
return tree_lua"