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
9
9
10
10
### Added
11
11
12
+ - ** API:** ` AnonymousMethodNode::getDeclarationSection ` method.
12
13
- ** API:** ` AnonymousMethodNode::getStatementBlock ` method.
13
14
- ** API:** ` AnonymousMethodNode::isEmpty ` method.
14
15
Original file line number Diff line number Diff line change 25
25
import java .util .Set ;
26
26
import java .util .stream .Collectors ;
27
27
import javax .annotation .Nonnull ;
28
+ import javax .annotation .Nullable ;
28
29
import org .antlr .runtime .Token ;
29
30
import org .sonar .plugins .communitydelphi .api .ast .AnonymousMethodHeadingNode ;
30
31
import org .sonar .plugins .communitydelphi .api .ast .AnonymousMethodNode ;
31
32
import org .sonar .plugins .communitydelphi .api .ast .CompoundStatementNode ;
33
+ import org .sonar .plugins .communitydelphi .api .ast .LocalDeclarationSectionNode ;
32
34
import org .sonar .plugins .communitydelphi .api .ast .RoutineParametersNode ;
33
35
import org .sonar .plugins .communitydelphi .api .ast .RoutineReturnTypeNode ;
34
36
import org .sonar .plugins .communitydelphi .api .symbol .declaration .RoutineDirective ;
@@ -99,6 +101,12 @@ public boolean isProcedure() {
99
101
return getRoutineKind () == RoutineKind .PROCEDURE ;
100
102
}
101
103
104
+ @ Override
105
+ @ Nullable
106
+ public LocalDeclarationSectionNode getDeclarationSection () {
107
+ return getFirstChildOfType (LocalDeclarationSectionNode .class );
108
+ }
109
+
102
110
@ Override
103
111
public CompoundStatementNode getStatementBlock () {
104
112
return getFirstChildOfType (CompoundStatementNode .class );
Original file line number Diff line number Diff line change 19
19
package org .sonar .plugins .communitydelphi .api .ast ;
20
20
21
21
import java .util .Set ;
22
+ import javax .annotation .Nullable ;
22
23
import org .sonar .plugins .communitydelphi .api .symbol .declaration .RoutineDirective ;
23
24
import org .sonar .plugins .communitydelphi .api .symbol .declaration .RoutineKind ;
24
25
import org .sonar .plugins .communitydelphi .api .type .Type ;
@@ -42,6 +43,9 @@ public interface AnonymousMethodNode extends ExpressionNode {
42
43
43
44
boolean isProcedure ();
44
45
46
+ @ Nullable
47
+ LocalDeclarationSectionNode getDeclarationSection ();
48
+
45
49
CompoundStatementNode getStatementBlock ();
46
50
47
51
boolean isEmpty ();
You can’t perform that action at this time.
0 commit comments