[fpc-pascal] Pascal Language Server

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Apr 28 17:01:54 CEST 2020


On Tue, 28 Apr 2020 20:58:18 +0700
Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

> > On Apr 28, 2020, at 8:52 PM, Mattias Gaertner via fpc-pascal
> > <fpc-pascal at lists.freepascal.org> wrote:
> > 
> > Codetoolboss.Error*  
> 
> Not sure I'm understand the usage. When do I check for errors and are
> there ever more than 1 or just the last error?

Only one.
Check when a function returns false.

> I'm guessing maybe
> after:
> 
>     URI := ParseURI(textDocument.uri);
>     Code := CodeToolBoss.FindFile(URI.Path + URI.Document);
>     for Change in contentChanges do
>     begin
>       Code.Source := TTextDocumentContentChangeEvent(Change).text;
>       // .... check for error here? ....

Yes

>     end;
>[...]
>     property ErrorColumn: integer read fErrorColumn;
>     property ErrorLine: integer read fErrorLine;
>     property ErrorMessage: string read fErrorMsg;

The above should be self explanatory.

Mattias


More information about the fpc-pascal mailing list