krfkeith / la-pe

Automatically exported from code.google.com/p/la-pe
0 stars 0 forks source link

Colon added to keywords - "Out of stack range" #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What will reproduce the problem?
-------
var i:Int32; 
begin
  for: i:=0 to 100 do Continue;

  //or ...
  case i of
    0: WriteLn('0');
    else: WriteLn('...');
  end;
end;

Expected output:
-------
-> Raise a proper exception when parsing "for:" as there is a colon there.

Version:
-------
-> The latest lape build for Simba

Additional information:
-------
Raises: "Error: Out of stack range" (no line number as well)
Now, this is just some bad/missing error handling. My guess is that Lape 
assumes "for:", or "else:" is a label, due to the colon, and handles it 
incorrectly.
Should raise a more proper error.

It's just a minor, almost irrelevant "issue" tho..

- slacky

Original issue reported on code.google.com by JarlHo...@gmail.com on 12 Aug 2014 at 6:22

GoogleCodeExporter commented 9 years ago
Was resolved today in rev. d0271a187b80 :)

Original comment by niels....@gmail.com on 12 Aug 2014 at 11:06

GoogleCodeExporter commented 9 years ago
Good :-) Glad to see you doing some updates to Lape!

Original comment by JarlHo...@gmail.com on 13 Aug 2014 at 10:39