From 83a40b7493b19e4b55167784e073e92733344b87 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 14 Dec 2018 19:23:26 -0800 Subject: Updating to support multiple method calls. --- core/metaprogramming.nom | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core') 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" -- cgit v1.2.3