File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/node Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -84,20 +84,12 @@ private AttributeListNode findFirstAttributeList() {
84
84
}
85
85
86
86
if (child instanceof VisibilitySectionNode ) {
87
- return findFirstAttributeList ((VisibilitySectionNode ) child );
88
- }
89
- }
90
- return null ;
91
- }
92
-
93
- private AttributeListNode findFirstAttributeList (VisibilitySectionNode visibilitySection ) {
94
- for (DelphiNode child : visibilitySection .getChildren ()) {
95
- if (child instanceof RoutineDeclarationNode ) {
96
- return ((RoutineDeclarationNode ) child ).getRoutineHeading ().getAttributeList ();
97
- }
98
-
99
- if (child instanceof PropertyNode ) {
100
- return ((PropertyNode ) child ).getAttributeList ();
87
+ DelphiNode declaration = child .getChild (0 );
88
+ if (declaration instanceof RoutineDeclarationNode ) {
89
+ return ((RoutineDeclarationNode ) declaration ).getRoutineHeading ().getAttributeList ();
90
+ } else if (declaration instanceof PropertyNode ) {
91
+ return ((PropertyNode ) declaration ).getAttributeList ();
92
+ }
101
93
}
102
94
}
103
95
return null ;
You can’t perform that action at this time.
0 commit comments