Skip to content

Grammar cannot parse System.pas #463

Description

@Tostis

Prerequisites

  • This bug is in SonarDelphi, not SonarQube or my Delphi code.
  • This bug has not already been reported.

SonarDelphi version

1.21

Delphi version

13

SonarQube version

No response

Issue description

Grammar cannot parse C:\Program Files (x86)\Embarcadero\Studio\37.0\source\rtl\sys\System.pas.

The error is "au.com.integradev.delphi.file.DelphiFile$DelphiFileConstructionException: Failed to construct DelphiFile (line 2203:85 no viable alternative at input ';')"

Steps to reproduce

Try to parse

unit MyUnit;
interface
var   { Text output line break handling.  Default value for all text files }
  DefaultTextLineBreakStyle: TTextLineBreakStyle = {$IFDEF POSIX} tlbsLF {$ENDIF}
                                                 {$IFDEF MSWINDOWS} tlbsCRLF {$ENDIF};
implementation
end.

Minimal Delphi code exhibiting the issue

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions