Skip to content

Commit bb10765

Browse files
committed
Merge pull request #958 from mgreter/bugfix/issue_938
Add arrow indicator to error message (sass_context)
2 parents bbfb15e + c75bb51 commit bb10765

15 files changed

+382
-450
lines changed

context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ namespace Sass {
301301
0, 0
302302
);
303303
import_stack.push_back(import);
304-
Parser p(Parser::from_c_str(queue[i].source, *this, ParserState(queue[i].abs_path, i)));
304+
Parser p(Parser::from_c_str(queue[i].source, *this, ParserState(queue[i].abs_path, queue[i].source, i)));
305305
Block* ast = p.parse();
306306
sass_delete_import(import_stack.back());
307307
import_stack.pop_back();

error_handling.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ namespace Sass {
1313

1414
void error(string msg, ParserState pstate, Backtrace* bt)
1515
{
16-
if (!pstate.path.empty() && Prelexer::quoted_string(pstate.path.c_str()))
17-
pstate.path = pstate.path.substr(1, pstate.path.size() - 1);
1816

1917
Backtrace top(bt, pstate, "");
2018
msg += top.to_string();

error_handling.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace Sass {
1414
enum Type { read, write, syntax, evaluation };
1515

1616
Type type;
17-
string path;
1817
ParserState pstate;
1918
string message;
2019

eval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ namespace Sass {
680680
case Textual::DIMENSION:
681681
result = new (ctx.mem) Number(t->pstate(),
682682
sass_atof(num.c_str()),
683-
Token(number(text.c_str()), t->pstate()),
683+
Token(number(text.c_str())),
684684
zero);
685685
break;
686686
case Textual::HEX: {

0 commit comments

Comments
 (0)