aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov/src/ast_visitor.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-20 04:01:06 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-21 03:22:39 +0800
commite4d55242d88695a5d95cad7689ca304ecafb2252 (patch)
tree802cb8a00d2776ce456d5a41ac8f1bc5f2b11514 /packages/sol-cov/src/ast_visitor.ts
parentdedddcfcf5793dfa9313569d4a831029a8270d59 (diff)
downloaddexon-0x-contracts-e4d55242d88695a5d95cad7689ca304ecafb2252.tar.gz
dexon-0x-contracts-e4d55242d88695a5d95cad7689ca304ecafb2252.tar.zst
dexon-0x-contracts-e4d55242d88695a5d95cad7689ca304ecafb2252.zip
Update to match latest type definitions and other small changes
Diffstat (limited to 'packages/sol-cov/src/ast_visitor.ts')
-rw-r--r--packages/sol-cov/src/ast_visitor.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/sol-cov/src/ast_visitor.ts b/packages/sol-cov/src/ast_visitor.ts
index 16984b5ec..564f0f7d2 100644
--- a/packages/sol-cov/src/ast_visitor.ts
+++ b/packages/sol-cov/src/ast_visitor.ts
@@ -116,8 +116,9 @@ export class ASTVisitor {
this._statementMap[this._entryId++] = this._getExpressionRange(ast);
}
private _getExpressionRange(ast: Parser.ASTNode): SingleFileSourceRange {
- const start = this._locationByOffset[ast.range[0]];
- const end = this._locationByOffset[ast.range[1] + 1];
+ const astRange = ast.range as [number, number];
+ const start = this._locationByOffset[astRange[0]];
+ const end = this._locationByOffset[astRange[1] + 1];
const range = {
start,
end,