Embarcadero / SonarDelphi

Embarcadero's official version of the Sonar-Delphi plugin for use to analyze Delphi projects with SonarQube. Working to collect updates and contributions from other versions into this one and move if forward with new features.
GNU Lesser General Public License v2.1
63 stars 13 forks source link

parsing error on RTTI Attributes #11

Open simonegirlanda opened 1 year ago

simonegirlanda commented 1 year ago

we are having a lot of errors on files with RTTI attributes

line 24:2 no viable alternative at input '[' line 25:2 missing DOTDOT at 'TBarcodeDecoder' line 25:20 missing SEMI at 'class' line 25:25 mismatched input '(' expecting OPERATOR line 28:4 mismatched input 'FContext' expecting CLASS line 31:4 mismatched input 'FSampleBarcode' expecting CLASS line 34:4 mismatched input 'FDecoderPropertyString' expecting CLASS line 37:4 mismatched input 'FDecoderStatoRec' expecting CLASS line 40:4 mismatched input 'FDecoderProperty' expecting CLASS line 43:4 mismatched input 'FAnagFields' expecting CLASS line 66:2 mismatched input 'public' expecting IMPLEMENTATION line 87:5 mismatched input ';' expecting DOT ERROR: Error while parsing D:\JA\workspace\featurebranch---1fb6176a\Kernel\Impl.BarcodeDecoder.pas

is there any way to implement that syntax?

source code

22 type
23   [Entity]
24   [Table(BARCODE_DECODER_TABLE), Automapping]
25   TBarcodeDecoder = class(TBaseEntityORM, IBarcodeDecoder)
26    private
27      [Column(BARCODE_DECODER_CONTEXT)]
28      FContext: TBarcodeContext;
29
30     [Column(BARCODE_DECODER_SAMPLE)]
31     FSampleBarcode: string;
32
33    [Column(BARCODE_DECODER_PROPERTY, [], 1000)]
34    FDecoderPropertyString: string;
35
36    [Column(BARCODE_DECODER_STATO_REC, [], 20)]
37    FDecoderStatoRec: TAnagStatoRec;
38
39    [Transient]
40    FDecoderProperty: TList<TBarcodeConfigRecord>;
41
42    [Transient]
44    FAnagFields: THashedStringList;
Cirras commented 11 months ago

Hi @simonegirlanda,

Attributes are supported by: integrated-application-development/sonar-delphi