[fpc-pascal] fcl-passrc errors

Ryan Joseph genericptr at gmail.com
Sat Oct 12 22:24:46 CEST 2019


More tests with the parser but it seems like it doesn’t know quite a bit of syntax. Are these not implemented yet?

1) class operators for records

EParserError: Expected "procedure" at token "operator" in file /Users/ryanjoseph/Developer/Projects/FPC/GLCanvas/GLCanvas.pas at line 115 column 7

class operator TVertex3.= (constref a, b: TVertex3): boolean;
begin
  result := (@a = @b);
end;

2)  For..in loops

EParserError: Expected := or in at token "(" in file /Users/ryanjoseph/Developer/Projects/FPC/NewEngine/Sources/Examples/EmptyWindow.pas at line 138 column 14

  for pointer(entity) in entities do
    begin
      entity.Update;
      entity.Draw(renderer);
      renderer.PushBox(entity.GetHitBox, TRGBA.RedColor);
    end;

3) {$i settings} will not find the file “settings.inc”. This is valid in FPC but the parser seems to have other rules.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list