Scriptor / pharen

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

test func_calls not pass #43

Closed francescoagati closed 12 years ago

francescoagati commented 12 years ago

the test func_calls.phn not pass. The problem is for float numbers. This form (check (+ 1 2 3.1) 6.1) is compiled in check((1 + 2 + 3\1), 6\1);

The code that generate this is here


       $char_mappings = array(
            '-'=>'_',
            '?'=>'__question',
            '!'=>'__exclam',
            '*'=>'__star',
            '.'=>'\\' //this convert 6.1 in 6\1
        );
Scriptor commented 12 years ago

Thanks for the bug report, looks like this is a result of converting dots to backslashes to support PHP namespacing. Should be able to fix soon.

Scriptor commented 12 years ago

Fixed in the following commit: https://github.com/Scriptor/pharen/commit/3fb7ab732a2af834689ed54da7d1c15703273d01