Commit c0a68f4a by Hampton Catlin

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

parents 73c460a9 568999f5
...@@ -436,7 +436,7 @@ namespace Sass { ...@@ -436,7 +436,7 @@ namespace Sass {
} }
Node imported_tree(parse_import()); Node imported_tree(parse_import());
if (imported_tree.type == Node::css_import) { if (imported_tree.type == Node::css_import) {
cerr << "css import inside block" << endl; // cerr << "css import inside block" << endl;
block << imported_tree; block << imported_tree;
block.has_statements = true; block.has_statements = true;
} }
...@@ -710,15 +710,20 @@ namespace Sass { ...@@ -710,15 +710,20 @@ namespace Sass {
{ {
if (lex< uri_prefix >()) if (lex< uri_prefix >())
{ {
lex< string_constant >(); const char* value = position;
Node result(Node::uri, line_number, lexed); const char* rparen = find_first< exactly<')'> >(position);
if (!rparen) syntax_error("URI is missing ')'");
Token contents(Token::make(value, rparen));
// lex< string_constant >();
Node result(Node::uri, line_number, contents);
position = rparen;
lex< exactly<')'> >(); lex< exactly<')'> >();
return result; return result;
} }
if (lex< value_schema >()) if (lex< value_schema >())
{ {
cerr << "parsing value schema: " << lexed.to_string() << endl; // cerr << "parsing value schema: " << lexed.to_string() << endl;
Document schema_doc(path, line_number, lexed, context); Document schema_doc(path, line_number, lexed, context);
return schema_doc.parse_value_schema(); return schema_doc.parse_value_schema();
......
list -> comma_list
-> <nothing>
comma_list -> space_list [',' space_list]*
space_list -> expression expression*
expression -> term [['+' | '-'] term]*
term -> factor [['*' | '/'] factor]*
factor -> percentage | dimension | number | hex |
string_constant | identifier | variable
-> '(' list ')'
a b c d
comma_list
space_list
value
value
value
value
a (b, c) d
comma_list
space_list
value
value
list
comma_list
space_list
value
space_list
value
value
a b, c d
comma_list
space_list
value
value
space_list
value
value
a/b c
list
comma_list
space_list
value
term
division
value
value
value
(a/b)
list
comma_list
space_list
value
list
comma_list
space_list
value
term
division
value
value
\ 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