Scriptor / pharen

Lisp to PHP Compiler
http://pharen.org
BSD 3-Clause "New" or "Revised" License
218 stars 31 forks source link

macro with function generation doesnt compile #25

Closed francescoagati closed 13 years ago

francescoagati commented 13 years ago

with this macro

(defmacro fn-generator-test (nm value) '(fn ~-nm () (def stuff "foo") (. stuff ~value))) (fn-generator-test "generated_test_fn" "bar")

i have this error

Warning: Invalid argument supplied for foreach() in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 604

Notice: Trying to get property of non-object in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 2055

Notice: Trying to get property of non-object in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 2016

Notice: Trying to get property of non-object in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 2018

Warning: get_class() expects parameter 1 to be object, string given in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 2043

Notice: Trying to get property of non-object in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 2055

Notice: Trying to get property of non-object in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 2016

Notice: Trying to get property of non-object in /Users/Francesco/Downloads/Scriptor-pharen-1266893/pharen.php on line 2018 ltei

francescoagati commented 13 years ago

doesn''t compile the macro. the result in php is:

<?php require_once('/Users/Francesco/Downloads/Scriptor-pharen-0379207/lang.php'); Lexical::$scopes['prova'] = array(); generated_test_fn("bar"); array();