Fix line number, column number error in ByteCodeBlock::computeNodeLOCFromByteCode (#99)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자 2018-06-26 16:12:48 +09:00 committed by 최영일/Tizen Platform Lab(SR)/Principal Engineer/삼성전자
commit 3968cb26ad

View file

@ -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)