1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] [SCSS] Support @if.

This commit is contained in:
Nathan Weizenbaum 2009-12-21 22:43:05 -08:00
parent b3d72dbf37
commit e8a71b6e66

View file

@ -36,7 +36,7 @@ module Sass
true
end
DIRECTIVES = Set[:mixin, :include, :debug, :for]
DIRECTIVES = Set[:mixin, :include, :debug, :for, :if]
def directive
return unless name = tok(ATRULE)
@ -97,6 +97,12 @@ module Sass
block(node(Sass::Tree::ForNode.new(var, from, to, exclusive)))
end
def if
expr = sass_script_parser.parse
ss
block(node(Sass::Tree::IfNode.new(expr)))
end
def variable
return unless raw '!'
name = tok! IDENT