[fpc-pascal] Pascal Language Server

Ryan Joseph genericptr at gmail.com
Wed Apr 29 10:15:34 CEST 2020

> On Apr 28, 2020, at 10:01 PM, Mattias Gaertner via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> Yes

This wasn't doing what I thought. It still doesn't give an error until I query at another point in the unit. I thought it would pre-parse or something but it seems to be on demand. I may have to handle the errors in another way.

    Code := CodeToolBoss.FindFile(URI.Path + URI.Document);
    for Change in contentChanges do
      Code.Source := TTextDocumentContentChangeEvent(Change).text;
      if CodeToolBoss.ErrorMessage <> '' then
          writeln(stderr, 'Document Parse error: ', 
                          CodeToolBoss.ErrorLine, ':', CodeToolBoss.ErrorColumn);

>>    end;
>> [...]
>>    property ErrorColumn: integer read fErrorColumn;
>>    property ErrorLine: integer read fErrorLine;
>>    property ErrorMessage: string read fErrorMsg;
> The above should be self explanatory.

Where can I know which file it was from? I've got error message from other units than the current one but I don't see a way to get the name of that file.

	Ryan Joseph

More information about the fpc-pascal mailing list