Scriptor / pharen

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

literal notation of dictionary is not translated correctly inside a macro #34

Closed francescoagati closed 13 years ago

francescoagati commented 13 years ago

if i pass a dictionary to a macro like in this example

(defmacro xxx (dict)
  '(do-something ~dict)
)

(xxx {#a 1 #b 2 #c 3})

the dictionary is not translated in array but in this

Lexical::$scopes['maps'] = array();
do_something(a(1, "b", 2, "c", 3));

if i pass the dict macro is correctly

(defmacro xxx (dict)
  '(do-something ~dict)
)
(xxx (dict #a 1 #b 2 #c 3))
Lexical::$scopes['maps'] = array();
do_something(array("a" => 1, "b" => 2, "c" => 3));