Skip to content

Commit

Permalink
Merge pull request #1 from Valdeirsk8/hotfix/constinlineissue
Browse files Browse the repository at this point in the history
fix: fixing issue Embarcadero#15 - changing grammar to allow inline const declaration
  • Loading branch information
Valdeirsk8 authored Nov 4, 2023
2 parents 1f87bfe + cc5560c commit f2ef8fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/antlr3/org/sonar/plugins/delphi/antlr/Delphi.g
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ exportsSection : 'exports' ident exportItem (',' ident exportItem)
;
exportItem : ('(' (formalParameterList)? ')')? (INDEX expression)? (NAME expression)? ('resident')?
;
inlineConstDeclaration : 'const' ident (':' typeDecl)? '=' expression
;
//****************************
//section type
//****************************
Expand Down Expand Up @@ -595,6 +597,7 @@ simpleStatement : designator ':=' expression
| designator // call
| gotoStatement
| inlineVarDeclaration
| inlineConstDeclaration
;
gotoStatement : 'goto' label
| 'exit' ('(' expression ')')?
Expand Down

0 comments on commit f2ef8fa

Please sign in to comment.