Skip to content

Commit

Permalink
Enhance statement range calculation by adding label checks for specif…
Browse files Browse the repository at this point in the history
…ic conditions

Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Dec 20, 2024
1 parent 5185272 commit 116fe61
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/language/providers/problemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,13 @@ function getStatementRangeFromGroup(currentGroup: StatementGroup): StatementRang
if (firstStatement && firstStatement.type !== StatementType.Unknown) {
statementRange = [currentGroup.range.start, currentGroup.range.end];

if (firstStatement.getLabel()) {
statementRange = [firstStatement.tokens[2].range.start, currentGroup.range.end];
const label = firstStatement.getLabel();
if (label) {
if (label.toUpperCase() === `CL`) {
statementRange = undefined;
} else {
statementRange = [firstStatement.tokens[2].range.start, currentGroup.range.end];
}
}
}

Expand Down

0 comments on commit 116fe61

Please sign in to comment.