> On Oct 13, 2019, at 6:18 AM, Michael Van Canneyt <mich...@freepascal.org> > wrote: > >>> Well spotted. I didn't notice that the extension was missing. >>> >>> That will definitely not be done in fcl-passrc. > > To be clear: > > here I meant that 'currently that will definitely not be done in fcl-passrc.'
This is a problem then because I wanted to make a language server for FPC but if the parser doesn’t understand accepted FPC syntax the whole thing falls apart. Can you make an FPC complient mode or something then? IMO if the parser included with the compiler doesn’t understand the same syntax as the compiler then we’re in trouble. Here’s basically what I’m doing to parse. Nothing special and the engine is just a template that does just the minimum (like the examples in the package). module := ParseSource(engine, ’bugs.pas', 'darwin', 'x86_64'); - This is a new version from 3 days ago. - The record sections failed because they are inside a function. If I pull the record out of the function they work. - Please test the operator because I don’t think the parser understands it. {$mode objfpc} {$modeswitch advancedrecords} program bugs; type TMyRecordA = record class operator = (constref a, b: TMyRecordA): boolean; end; class operator TMyRecordA.= (constref a, b: TMyRecordA): boolean; begin result := (@a = @b); end; procedure DoThis; type TMyRecordB = record private x, y, z: integer; end; begin end; begin end. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal