On Tue, 2025-03-11 at 11:47 -0400, David Malcolm wrote:
> This patch changes the output on the simple test I tried from:
> 
> $ ./gcobol -B. hello.cob -S
> hello.cob:2:8: error: syntax error, unexpected NAME, expecting
> FUNCTION or PROGRAM-ID
>     2 |        porgram-id. hello.
>       |        ^
> cobol1: error: failed compiling hello.cob
> 
> to:
> 
> $ ./gcobol -B. hello.cob -S
> hello.cob:2:8: error: syntax error, unexpected NAME, expecting
> FUNCTION or PROGRAM-ID
>     2 |        porgram-id. hello.
>       |        ^~~~~~~~~~~
> cobol1: error: failed compiling hello.cob
> 
> I haven't tested this patch properly yet.
> 

On a related note, gcobol seems to be correctly emitting diagnostics as
machine-readable SARIF.  I tried the above with -fdiagnostics-
format=sarif-file.  For the curious, I'm attaching a screenshot of VS
Code viewing the above errors (via the sarif file and its sarif
extension)  I was hoping for a long squiggly underline on the
misspelled token, though for some reason VS Code isn't showing the
range (but the .sarif file looks right to me).

Dave

Reply via email to