Skip to content

Attributes on visibility sections cause parsing failures #461

Description

@Tostis

Prerequisites

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

SonarDelphi version

1.20

Delphi version

13

SonarQube version

No response

Issue description

The parsers only supports the attribute before the field name like this:
` private [MyAttribute] FMyField: String;

private var [MyAttribute] FMyField: String;`

but RAD supports those too:

` [MyAttribute]
private FMyField: String;

[MyAttribute]
private var FMyField: String;`

Steps to reproduce

Create a class with attribute before visibility

` [MyAttribute]
private FMyField: String;

[MyAttribute]
private var FMyField: String;`

sonar-delphi is unable to parse the class.

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions