diff options
Diffstat (limited to 'core/metaprogramming.nom')
| -rw-r--r-- | core/metaprogramming.nom | 3 |
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" |
