Commit fff0027c by Aaron Leung

Handling the "!important" directive.

parent 9961ae15
...@@ -7,4 +7,6 @@ div { ...@@ -7,4 +7,6 @@ div {
/* things that aren't logical keywords */ /* things that aren't logical keywords */
a: hey andalso ho and-come-on hoo; a: hey andalso ho and-come-on hoo;
b: hey orelse ho andalso hoo; b: hey orelse ho andalso hoo;
c: hoogoo ! important blah;
d: boogoo !important;
} }
\ No newline at end of file
...@@ -602,6 +602,9 @@ namespace Sass { ...@@ -602,6 +602,9 @@ namespace Sass {
if (peek< functional >()) if (peek< functional >())
{ return parse_function_call(); } { return parse_function_call(); }
if (lex< important >())
{ return Node(Node::important, line_number, lexed); }
if (lex< identifier >()) if (lex< identifier >())
{ return Node(Node::identifier, line_number, lexed); } { return Node(Node::identifier, line_number, lexed); }
......
...@@ -238,6 +238,10 @@ namespace Sass { ...@@ -238,6 +238,10 @@ namespace Sass {
else return "false"; else return "false";
} break; } break;
case important: {
return "!important";
} break;
default: { default: {
// return content.token.to_string(); // return content.token.to_string();
if (!has_children && type != flags) return content.token.to_string(); if (!has_children && type != flags) return content.token.to_string();
......
...@@ -74,6 +74,7 @@ namespace Sass { ...@@ -74,6 +74,7 @@ namespace Sass {
number, number,
numeric_color, numeric_color,
boolean, boolean,
important,
function_call, function_call,
mixin, mixin,
......
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