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

2019-10-15 Thread Michael Van Canneyt
On Tue, 15 Oct 2019, Ryan Joseph wrote: On Oct 15, 2019, at 5:02 PM, Mattias Gaertner via fpc-pascal wrote: When parsing a program the module is a TPasProgram, which has a ProgramSection. Of course, thanks. A couple other questions if you don’t mind: 1) Are there any examples of the

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

2019-10-15 Thread Ryan Joseph
> On Oct 15, 2019, at 5:02 PM, Mattias Gaertner via fpc-pascal > wrote: > > When parsing a program the module is a TPasProgram, which has a > ProgramSection. Of course, thanks. A couple other questions if you don’t mind: 1) Are there any examples of the resolver? I’m looking through the uni

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

2019-10-15 Thread Mattias Gaertner via fpc-pascal
On Tue, 15 Oct 2019 16:38:35 -0400 Ryan Joseph wrote: > Another related question about functions. > > In unit files there is a InterfaceSection/ImplementationSection in > TPasModule and I can use those to get a list of functions (because > they descend from TPasSection). In a program file there

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

2019-10-15 Thread Ryan Joseph
Another related question about functions. In unit files there is a InterfaceSection/ImplementationSection in TPasModule and I can use those to get a list of functions (because they descend from TPasSection). In a program file there only seems to be a InitializationSection but this doesn’t cont

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

2019-10-14 Thread Mattias Gaertner via fpc-pascal
On Sun, 13 Oct 2019 23:13:04 +0200 (CEST) Michael Van Canneyt wrote: >[...] > The resolver is implemented in pasresolver.pp and pasresolveeval.pas > (but I think you'll only need the former) The latter is used by the former. Note that the resolver can only parse whole modules, not mere expressio

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 is