Commit 707e3b75 by Aaron Leung

Getting things to build.

parent 3deff56c
......@@ -31,9 +31,9 @@ namespace Sass {
private:
// force the use of the "make_from_..." factory funtions
Document(Context& ctx);
~Document();
public:
Document(const Document& doc);
~Document();
static Document make_from_file(Context& ctx, string path);
static Document make_from_source_chars(Context& ctx, char* src, string path = "");
......
......@@ -4,8 +4,8 @@ namespace Sass {
enum Type { read, write, syntax, evaluation };
Type type;
size_t line;
string path;
size_t line;
string message;
Error(Type type, string path, size_t line, string message)
......
......@@ -72,7 +72,7 @@ extern "C" {
}
catch (Error& e) {
stringstream msg_stream;
msg_stream << "ERROR -- " << e.file_name << ", line " << e.line_number << ": " << e.message << endl;
msg_stream << "ERROR -- " << e.path << ", line " << e.line << ": " << e.message << endl;
string msg(msg_stream.str());
char* msg_str = (char*) malloc(msg.size() + 1);
strcpy(msg_str, msg.c_str());
......@@ -100,7 +100,7 @@ extern "C" {
try {
Context cpp_ctx(c_ctx->options.include_paths);
// Document doc(c_ctx->input_path, 0, cpp_ctx);
Document doc(Document::make_from_file(cpp_ctx, string(c_ctx->input_path));
Document doc(Document::make_from_file(cpp_ctx, string(c_ctx->input_path)));
// cerr << "MADE A DOC AND CONTEXT OBJ" << endl;
// cerr << "REGISTRY: " << doc.context.registry.size() << endl;
c_ctx->output_string = process_document(doc, c_ctx->options.output_style);
......@@ -109,7 +109,7 @@ extern "C" {
}
catch (Error& e) {
stringstream msg_stream;
msg_stream << "ERROR -- " << e.file_name << ", line " << e.line_number << ": " << e.message << endl;
msg_stream << "ERROR -- " << e.path << ", line " << e.line << ": " << e.message << endl;
string msg(msg_stream.str());
char* msg_str = (char*) malloc(msg.size() + 1);
strcpy(msg_str, msg.c_str());
......
......@@ -13,7 +13,7 @@ struct sass_options {
};
struct sass_context {
char* input_string;
char* source_string;
char* output_string;
struct sass_options options;
int error_status;
......
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