File tree Expand file tree Collapse file tree 3 files changed +22
-1
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 +22
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Added
11+
12+ - ** API:** ` RepeatStatementNode::getGuardExpression ` method.
13+ - ** API:** ` RepeatStatementNode::getStatements ` method.
14+
1015### Fixed
1116
1217- Parsing errors where adjacent ` > ` and ` = ` tokens were wrongly interpreted as the ` >= ` operator.
Original file line number Diff line number Diff line change 2020
2121import au .com .integradev .delphi .antlr .ast .visitors .DelphiParserVisitor ;
2222import org .antlr .runtime .Token ;
23+ import org .sonar .plugins .communitydelphi .api .ast .ExpressionNode ;
2324import org .sonar .plugins .communitydelphi .api .ast .RepeatStatementNode ;
25+ import org .sonar .plugins .communitydelphi .api .ast .StatementListNode ;
2426
2527public final class RepeatStatementNodeImpl extends DelphiNodeImpl implements RepeatStatementNode {
2628 public RepeatStatementNodeImpl (Token token ) {
2729 super (token );
2830 }
2931
32+ @ Override
33+ public ExpressionNode getGuardExpression () {
34+ return (ExpressionNode ) getChild (2 );
35+ }
36+
37+ @ Override
38+ public StatementListNode getStatementList () {
39+ return (StatementListNode ) getChild (0 );
40+ }
41+
3042 @ Override
3143 public <T > T accept (DelphiParserVisitor <T > visitor , T data ) {
3244 return visitor .visit (this , data );
Original file line number Diff line number Diff line change 1818 */
1919package org .sonar .plugins .communitydelphi .api .ast ;
2020
21- public interface RepeatStatementNode extends StatementNode {}
21+ public interface RepeatStatementNode extends StatementNode {
22+ ExpressionNode getGuardExpression ();
23+
24+ StatementListNode getStatementList ();
25+ }
You can’t perform that action at this time.
0 commit comments