Skip to content

Commit

Permalink
Merge pull request #958 from mgreter/bugfix/issue_938
Browse files Browse the repository at this point in the history
Add arrow indicator to error message (sass_context)
  • Loading branch information
mgreter committed Mar 19, 2015
2 parents bbfb15e + c75bb51 commit bb10765
Show file tree
Hide file tree
Showing 15 changed files with 382 additions and 450 deletions.
2 changes: 1 addition & 1 deletion context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ namespace Sass {
0, 0
);
import_stack.push_back(import);
Parser p(Parser::from_c_str(queue[i].source, *this, ParserState(queue[i].abs_path, i)));
Parser p(Parser::from_c_str(queue[i].source, *this, ParserState(queue[i].abs_path, queue[i].source, i)));
Block* ast = p.parse();
sass_delete_import(import_stack.back());
import_stack.pop_back();
Expand Down
2 changes: 0 additions & 2 deletions error_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ namespace Sass {

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

Backtrace top(bt, pstate, "");
msg += top.to_string();
Expand Down
1 change: 0 additions & 1 deletion error_handling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace Sass {
enum Type { read, write, syntax, evaluation };

Type type;
string path;
ParserState pstate;
string message;

Expand Down
2 changes: 1 addition & 1 deletion eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ namespace Sass {
case Textual::DIMENSION:
result = new (ctx.mem) Number(t->pstate(),
sass_atof(num.c_str()),
Token(number(text.c_str()), t->pstate()),
Token(number(text.c_str())),
zero);
break;
case Textual::HEX: {
Expand Down
Loading

0 comments on commit bb10765

Please sign in to comment.