gravicappa / shen-js

Shen on javascript.
Other
68 stars 12 forks source link

Partial function and shenstr(symbol) #5

Closed xkxx closed 11 years ago

xkxx commented 11 years ago

Hi gravicappa,

A couple of bugs here.

First, entering partial function '(+ 1)' gives ReferenceError: $plus$ is not defined. The same bug also occurs in function eval_string.

Second, when calling shenstr(symbol), for example [Shen.type_symbol, "sky"], it gives a very weird string such as [non-ascii-symbol]funex739[non-ascii-symbol], while it should return 'sky' (the symbol itself)

At last, calling eval_string with a blank string gives error: Object [non-ascii-symbol]funex728[non-ascii-symbol] cannot be escaped, while it should return a blank string.

Regards, xkxx

gravicappa commented 11 years ago

Shen.shenstr works for me. Shen.eval_string is fixed (not pushed yet though). The other I'll fix in a while.

xkxx commented 11 years ago

Sorry, it turns out the reference chain of Shen.type_symbol gets broken after traversing across javascript contexts. I have fixed this bug in my fork repo.

PM me when partial function is fixed and I will update my port accordingly.

gravicappa commented 11 years ago

Fixed.