aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov/src/ast_visitor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-cov/src/ast_visitor.ts')
-rw-r--r--packages/sol-cov/src/ast_visitor.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/sol-cov/src/ast_visitor.ts b/packages/sol-cov/src/ast_visitor.ts
index 66190afec..88309d3eb 100644
--- a/packages/sol-cov/src/ast_visitor.ts
+++ b/packages/sol-cov/src/ast_visitor.ts
@@ -113,8 +113,8 @@ export class ASTVisitor {
this._statementMap[this._entryId++] = this._getExpressionRange(ast);
}
private _getExpressionRange(ast: Parser.ASTNode): SingleFileSourceRange {
- const start = this._locationByOffset[ast.range[0] - 1];
- const end = this._locationByOffset[ast.range[1]];
+ const start = this._locationByOffset[ast.range[0]];
+ const end = this._locationByOffset[ast.range[1] + 1];
const range = {
start,
end,