Commit 3aa81584 by Aaron Leung

Keeping track of the filename when parsing interpolants.

parent 526766a4
...@@ -100,8 +100,8 @@ namespace Sass { ...@@ -100,8 +100,8 @@ namespace Sass {
++context.ref_count; ++context.ref_count;
} }
Document::Document(size_t line_number, Token t, Context& context) Document::Document(const string& path, size_t line_number, Token t, Context& context)
: path(string()), : path(path),
source(const_cast<char*>(t.begin)), source(const_cast<char*>(t.begin)),
position(t.begin), position(t.begin),
end(t.end), end(t.end),
......
...@@ -30,7 +30,7 @@ namespace Sass { ...@@ -30,7 +30,7 @@ namespace Sass {
Document(char* path_str, char* source_str, Context& ctx); Document(char* path_str, char* source_str, Context& ctx);
Document(string path, char* source = 0); Document(string path, char* source = 0);
Document(string path, Context& context); Document(string path, Context& context);
Document(size_t line_number, Token t, Context& context); Document(const string& path, size_t line_number, Token t, Context& context);
~Document(); ~Document();
template <prelexer mx> template <prelexer mx>
......
...@@ -720,7 +720,7 @@ namespace Sass { ...@@ -720,7 +720,7 @@ namespace Sass {
if (lex< interpolant >()) if (lex< interpolant >())
{ {
Token insides(Token::make(lexed.begin + 2, lexed.end - 1)); Token insides(Token::make(lexed.begin + 2, lexed.end - 1));
Document interp(line_number, insides, context); Document interp(path, line_number, insides, context);
return interp.parse_list(); return interp.parse_list();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment