News for hackers. Stuff that matters.
Re:Show HN: My Turbo Pascal compiler in JavaScript by lkesteloot on Friday October 18, 2013 @03:12PM (#6573385)
Well the error message is confusing (it's trying to cast from an integer (type 70) to a procedure (type 76)), but it's correct to fail to compile. But yeah I'm not sure that my logic there is altogether correct. I re-wrote it a few times as I found new cases that weren't correctly handled. Specifically, I'm not sure whether the type of the identifier should guide the parsing. It's similar to the "x*y" ambiguity in parsing C (multiplication or declaration of pointer variable y).

There are no comments on this comment yet.