Skip to content

Commit 2fbe0e0

Browse files
committed
Fix error reporting
1 parent f92e5d5 commit 2fbe0e0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/debugger.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,9 @@ inline std::string pstate_source_position(AST_Node* node)
321321
{
322322
std::stringstream str;
323323
SourceSpan pstate(node->pstate());
324-
str << (pstate.getSrcId() == std::string::npos ? 99999999 : pstate.getSrcId())
325-
<< "@[" << (pstate.getLine()) << ":" << (pstate.getColumn()) << "]";
324+
str << (pstate.getSrcId() == std::string::npos ? 9999999 : pstate.getSrcId())
325+
<< "@[" << (pstate.position.line) << ":" << (pstate.position.column) << "]"
326+
<< "+[" << (pstate.span.line) << ":" << (pstate.span.column) << "]";
326327
#ifdef DEBUG_SHARED_PTR
327328
str << "x" << node->getRefCount() << ""
328329
<< " {#" << node->objId << "}"

src/scanner_string.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ namespace Sass {
6161
void StringScanner::consumedChar(uint8_t character)
6262
{
6363
switch (character) {
64+
case $cr:
65+
offset.column += 1;
66+
break;
6467
case $lf:
6568
offset.line += 1;
6669
offset.column = 0;

0 commit comments

Comments
 (0)