mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Fix line number, column number error in ByteCodeBlock::computeNodeLOCFromByteCode (#99)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
d66c4b900b
commit
3968cb26ad
1 changed files with 7 additions and 1 deletions
|
|
@ -98,7 +98,13 @@ ExtendedNodeLOC ByteCodeBlock::computeNodeLOCFromByteCode(Context* c, size_t cod
|
|||
}
|
||||
}
|
||||
|
||||
return computeNodeLOC(cb->asInterpretedCodeBlock()->src(), cb->asInterpretedCodeBlock()->sourceElementStart(), index);
|
||||
size_t indexRelatedWithScript = index;
|
||||
index -= cb->asInterpretedCodeBlock()->sourceElementStart().index;
|
||||
|
||||
auto result = computeNodeLOC(cb->asInterpretedCodeBlock()->src(), cb->asInterpretedCodeBlock()->sourceElementStart(), index);
|
||||
result.index = indexRelatedWithScript;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ExtendedNodeLOC ByteCodeBlock::computeNodeLOC(StringView src, ExtendedNodeLOC sourceElementStart, size_t index)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue