Closed edcrypt closed 7 years ago
Thank you for the kind words and the bug report. I appreciate the feedback.
I think it's a problem with the parser, parsing:
:b 1
{
|Add n| n + b
}
as
:b(1)({
|Add n| n + b
})
I'll look into it tomorrow.
Thanks again! Best regards Joakim
The bug turned out to be very simple to fix (one character in parser.js), so it should work now.
Best regards Joakim
Thanks @Ahnfelt !
Unfortunately, a similar case remains:
:a {|b|
{
|Add n| n + b
}
}
:c {|b d|
:aA a(b)
{
|m| aA(m)
}
}
:e c(1, 2)
system.SetText(e.Add(2))
Gives:
Unexpected argument: function (_X) { var m_ = _X; return _A(aA_, m_); }
Regards,
Right you are!
It turned out that I reenabled significant line breaks after skipping whitespace after ')'. It's fixed now.
Thank you for reporting the problem, it's a big help towards improving the implementation quality.
Really liked the concept. It's quite close to something that has been bouncing on my head for quite some time (a decade :P)
I think I found an issue that I don't have the time right now to check.
Trying:
Results on:
Unexpected argument: function(_X) { if(_X == "Add") { return function(_X) { var n_ = _X; return _A(_A(n_, "+"), b_); }; } throw "Unexpected argument: " + _X;}
While:
Works.