Commit d7db05f0 by Hampton Catlin

Merge branch 'master' of github.com:hcatlin/libsass

parents 81270ce2 364ed866
...@@ -33,4 +33,10 @@ div { ...@@ -33,4 +33,10 @@ div {
+ foo(); + foo();
d: d; d: d;
+ bar; + bar;
}
div {
color: blah blah;
*color: blah bloo;
_color: foo boo;
} }
\ No newline at end of file
//
// This is when you want to compile a whole folder of stuff
//
// var opts = sass_new_context();
// opts->sassPath = "/Users/hcatlin/dev/asset/stylesheet";
// opts->cssPath = "/Users/hcatlin/dev/asset/stylesheets/.css";
// opts->includePaths = "/Users/hcatlin/dev/asset/stylesheets:/Users/hcatlin/sasslib";
// opts->outputStyle => SASS_STYLE_COMPRESSED;
// sass_compile(opts, &callbackfunction);
//
//
// This is when you want to compile a string
//
// opts = sass_new_context();
// opts->inputString = "a { width: 50px; }";
// opts->includePaths = "/Users/hcatlin/dev/asset/stylesheets:/Users/hcatlin/sasslib";
// opts->outputStyle => SASS_STYLE_EXPANDED;
// var cssResult = sass_compile(opts, &callbackfunction);
#include <stdio.h> #include <stdio.h>
#include "src/sass_interface.h" #include "src/sass_interface.h"
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
if (argc < 2) { if (argc < 2) {
printf("Hey, I need an input file!\n"); printf("Usage: sassc [INPUT FILE]\n");
return 0; return 0;
} }
struct sass_file_context* ctx = sass_new_file_context(); struct sass_file_context* ctx = sass_new_file_context();
ctx->options.include_paths = "::/blah/bloo/fuzz:/slub/flub/chub::/Users/Aaron/dev/libsass/::::/huzz/buzz:::"; ctx->options.include_paths = "";
ctx->options.output_style = SASS_STYLE_NESTED; ctx->options.output_style = SASS_STYLE_NESTED;
ctx->input_path = argv[1]; ctx->input_path = argv[1];
......
...@@ -498,7 +498,7 @@ namespace Sass { ...@@ -498,7 +498,7 @@ namespace Sass {
Node Document::parse_rule() { Node Document::parse_rule() {
Node rule(Node::rule, context.registry, line_number, 2); Node rule(Node::rule, context.registry, line_number, 2);
if (!lex< identifier >()) syntax_error("invalid property name"); if (!lex< sequence< optional< exactly<'*'> >, identifier > >()) syntax_error("invalid property name");
rule << Node(Node::property, line_number, lexed); rule << Node(Node::property, line_number, lexed);
if (!lex< exactly<':'> >()) syntax_error("property \"" + lexed.to_string() + "\" must be followed by a ':'"); if (!lex< exactly<':'> >()) syntax_error("property \"" + lexed.to_string() + "\" must be followed by a ':'");
rule << parse_list(); rule << 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