Commit 265ae098 by Aaron Leung

Getting started on the Sass context objects.

parent 08064b07
#include <stdlib.h>
#include <stdio.h>
#include "context.h"
#include "file.h"
sass_context *make_sass_context_from_file(char *path) {
sass_context *ctx = malloc(sizeof(sass_context));
if (!ctx) {
printf("ERROR: could not allocate sass context object.\n");
abort();
}
ctx->path = path;
ctx->src = sass_read_file(path);
return ctx;
}
\ No newline at end of file
#include <setjmp.h>
typedef struct {
char *path; /* the full directory+filename of the source file */
char *src; /* the text of the entire source file */
char *pos; /* keeps track of the parser/scanner's current position */
jmp_buf env; /* the top of the exception-handling stack */
/* more to come */
} sass_context;
sass_context *make_sass_context_from_file(char *path);
\ No newline at end of file
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