Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Am 13.10.2019 um 23:19 schrieb Ryan Joseph: On Oct 13, 2019, at 11:11 AM, Sven Barth via fpc-pascal wrote: Then specialize the list with the correct type. This issue *will* be fixed and is not up to discussion. Here’s some code from the parser today. TFPList is being used because it’s a

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Ryan Joseph
> On Oct 13, 2019, at 11:11 AM, Sven Barth via fpc-pascal > wrote: > > Then specialize the list with the correct type. > > This issue *will* be fixed and is not up to discussion. > Here’s some code from the parser today. TFPList is being used because it’s a generic storage for various

Re: [fpc-pascal] fcl-passrc method/function invocations

2019-10-13 Thread Michael Van Canneyt
On Sun, 13 Oct 2019, Ryan Joseph wrote: One of my tasks for the language server is determining “references” to a symbol, which means for functions I need to know all the times they were called. Given the syntax tree the parser creates how do I know when a function was called? I see there

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Michael Van Canneyt
On Sun, 13 Oct 2019, Ryan Joseph wrote: On Oct 13, 2019, at 12:30 PM, Michael Van Canneyt wrote: Ahah... That needs to be tested then. This seems to be a bug. Can you please create a bug with a compilable example ? - Please test the operator because I don’t think the parser

[fpc-pascal] fcl-passrc method/function invocations

2019-10-13 Thread Ryan Joseph
One of my tasks for the language server is determining “references” to a symbol, which means for functions I need to know all the times they were called. Given the syntax tree the parser creates how do I know when a function was called? I see there is a TPasImplSimple that seems related but I’m

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Ryan Joseph
> On Oct 13, 2019, at 12:30 PM, Michael Van Canneyt > wrote: > > Ahah... > > That needs to be tested then. This seems to be a bug. Can you please create > a bug with a compilable example ? > >> - Please test the operator because I don’t think the parser understands it. > > OK, that's

Re: [fpc-pascal] *etFTime -> File*etDate

2019-10-13 Thread Christo Crause
On Sun, Oct 13, 2019 at 8:03 PM Ched < charles.edouard.des.vastes.vig...@gmail.com> wrote: > Hello, > > In https://www.freepascal.org/docs-html/rtl/sysutils/filenameroutines.html > , > > FileSetDate < > https://www.freepascal.org/docs-html/rtl/sysutils/filesetdate.html>Get > file dates should be

[fpc-pascal] *etFTime -> File*etDate

2019-10-13 Thread Ched
Hello, In https://www.freepascal.org/docs-html/rtl/sysutils/filenameroutines.html , FileSetDate Get file dates  should be corrected to _S_et . Now, my real problem is that the following code is compiled when SYS is not

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Michael Van Canneyt
On Sun, 13 Oct 2019, Michael Van Canneyt wrote: - 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. Ahah... That needs to be tested then. This seems to be a bug. Can you please

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Michael Van Canneyt
On Sun, 13 Oct 2019, Ryan Joseph wrote: 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

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am So., 13. Okt. 2019, 16:22: > > > > On Oct 13, 2019, at 5:58 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > >> Delphi does not allow it: > >> > >> [dcc32 Error] Project1.dpr(18): E1019 For loop control variable must be > simple local

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Ryan Joseph
> On Oct 13, 2019, at 5:58 AM, Sven Barth via fpc-pascal > wrote: > >> Delphi does not allow it: >> >> [dcc32 Error] Project1.dpr(18): E1019 For loop control variable must be >> simple local variable >> >> I don't think this should be allowed, either. > > Same. Why not? I just had this

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Ryan Joseph
> On Oct 13, 2019, at 6:18 AM, Michael Van Canneyt > 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

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Michael Van Canneyt
On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote: Could the missing ".inc" be the problem? I have not checked, but it could be that FPC always adds ".inc" if no extension is present. Well spotted. I didn't notice that the extension was missing. That will definitely not be done in

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Am 13.10.2019 um 11:26 schrieb Michael Van Canneyt: On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote: Just type casting because the array is an array of pointers. I get these errors otherwise "Incompatible types: got "Pointer" expected “TEntity"”. I could use a proper type in a generic

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Michael Van Canneyt
On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote: Just type casting because the array is an array of pointers. I get these errors otherwise "Incompatible types: got "Pointer" expected “TEntity"”. I could use a proper type in a generic array but I don’t always do that. I didn't know

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am So., 13. Okt. 2019, 08:20: > > 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 > >

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Michael Van Canneyt
On Sat, 12 Oct 2019, Ryan Joseph wrote: On Oct 12, 2019, at 6:43 PM, Michael Van Canneyt wrote: 1) class operators for records EParserError: Expected "procedure" at token "operator" in file