File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
delphi-frontend/src/main/java
au/com/integradev/delphi/antlr/ast/node
org/sonar/plugins/communitydelphi/api/ast Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010### Added
1111
12+ - ** API:** ` AnonymousMethodNode::getDeclarationSection ` method.
1213- ** API:** ` AnonymousMethodNode::getStatementBlock ` method.
1314- ** API:** ` AnonymousMethodNode::isEmpty ` method.
1415
Original file line number Diff line number Diff line change 2525import java .util .Set ;
2626import java .util .stream .Collectors ;
2727import javax .annotation .Nonnull ;
28+ import javax .annotation .Nullable ;
2829import org .antlr .runtime .Token ;
2930import org .sonar .plugins .communitydelphi .api .ast .AnonymousMethodHeadingNode ;
3031import org .sonar .plugins .communitydelphi .api .ast .AnonymousMethodNode ;
3132import org .sonar .plugins .communitydelphi .api .ast .CompoundStatementNode ;
33+ import org .sonar .plugins .communitydelphi .api .ast .LocalDeclarationSectionNode ;
3234import org .sonar .plugins .communitydelphi .api .ast .RoutineParametersNode ;
3335import org .sonar .plugins .communitydelphi .api .ast .RoutineReturnTypeNode ;
3436import org .sonar .plugins .communitydelphi .api .symbol .declaration .RoutineDirective ;
@@ -99,6 +101,12 @@ public boolean isProcedure() {
99101 return getRoutineKind () == RoutineKind .PROCEDURE ;
100102 }
101103
104+ @ Override
105+ @ Nullable
106+ public LocalDeclarationSectionNode getDeclarationSection () {
107+ return getFirstChildOfType (LocalDeclarationSectionNode .class );
108+ }
109+
102110 @ Override
103111 public CompoundStatementNode getStatementBlock () {
104112 return getFirstChildOfType (CompoundStatementNode .class );
Original file line number Diff line number Diff line change 1919package org .sonar .plugins .communitydelphi .api .ast ;
2020
2121import java .util .Set ;
22+ import javax .annotation .Nullable ;
2223import org .sonar .plugins .communitydelphi .api .symbol .declaration .RoutineDirective ;
2324import org .sonar .plugins .communitydelphi .api .symbol .declaration .RoutineKind ;
2425import org .sonar .plugins .communitydelphi .api .type .Type ;
@@ -42,6 +43,9 @@ public interface AnonymousMethodNode extends ExpressionNode {
4243
4344 boolean isProcedure ();
4445
46+ @ Nullable
47+ LocalDeclarationSectionNode getDeclarationSection ();
48+
4549 CompoundStatementNode getStatementBlock ();
4650
4751 boolean isEmpty ();
You can’t perform that action at this time.
0 commit comments