robert-strandh / SICL

A fresh implementation of Common Lisp
Other
1.07k stars 79 forks source link

my solution to bug that read symbols + and - as the number zero. #22

Closed aarvid closed 9 years ago

aarvid commented 9 years ago

refers to issue #21 This solutions assumes that if a token (in perhaps-integer) does not contains a decimal-digit then it is a symbol. It works for symbols +, -, +. and -. It also works when these symbols are embedded in a list. It does not break any existing tests. I think it is a decent solution but I am not sure that it is the best solution.

This also fixes a bug where on the last case of perhaps-integer it returns just numerator instead of (* sign numerator)