Commit 1878317b by Aaron Leung

Handling more interpolation cases. Don't try to compile this.

parent 7f2d9ae4
......@@ -568,16 +568,20 @@ namespace Sass {
Node Document::parse_rule() {
Node rule(context.new_Node(Node::rule, path, line, 2));
if (!lex< sequence< optional< exactly<'*'> >, identifier > >()) {
lex< spaces_and_comments >(); // get the line number right
if (lex< sequence< optional< exactly<'*'> >, identifier > >()) {
rule << context.new_Node(node::property, path, line, lexed);
}
else if (peek< sequence< optional< exactly<'*'> >, identifier_schema > >()) {
rule << parse_identifier_schema();
}
else {
throw_syntax_error("invalid property name");
}
rule << context.new_Node(Node::property, path, line, lexed);
if (!lex< exactly<':'> >()) throw_syntax_error("property \"" + lexed.to_string() + "\" must be followed by a ':'");
rule << parse_list();
return rule;
}
Node Document::parse_list()
{
return parse_comma_list();
......@@ -919,6 +923,19 @@ namespace Sass {
schema.should_eval() = true;
return schema;
}
Node Document::parse_identifier_schema()
{
Node schema(context.new_Node(Node::identifier_schema, path, line, 1));
Token stok(lexed);
while (position < stok.end) {
}
schema.should_eval() = true;
return schema;
}
Node Document::parse_function_call()
{
......
......@@ -83,10 +83,10 @@ namespace Sass {
// Match interpolant schemas
const char* identifier_schema(const char* src) {
// follows this pattern: (x*ix*)+
// follows this pattern: (x*ix*)+ ... well, not quite
return one_plus< sequence< zero_plus< identifier >,
interpolant,
zero_plus< identifier > > >(src);
zero_plus< alternatives< identifier, number, exactly<'-'> > > > >(src);
}
const char* value_schema(const char* src) {
// follows this pattern: ([xyz]*i[xyz]*)+
......
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