Scriptor / pharen

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

macro are evalutated also if they aren't call #11

Closed francescoagati closed 14 years ago

francescoagati commented 14 years ago

(defmacro x () (echo 444)
'(+ 1 2) )

(defmacro y() '(x) )

i get:

<?php require_once('/Users/Francesco/Desktop/pharen_my/pharen/lang.php'); Lexical::$scopes['pharen_tests'] = array(); 1 + 23;

and the echo 4444 is executed

Scriptor commented 14 years ago

Working on this bug now. Just noticed you didn't put a space between y and (), it should be like:

(defmacro y () '(x))
Scriptor commented 14 years ago

Fixed after commits:

http://github.com/Scriptor/pharen/commit/d1b6c9c66a1d903e256c062d79fe29d2eaf2ce41 http://github.com/Scriptor/pharen/commit/a922f3f72202340da5096e318c32e7bcf2371a65