lib/sass/scss/parser.rb in haml-3.0.16 vs lib/sass/scss/parser.rb in haml-3.0.17

- old
+ new

@@ -107,15 +107,14 @@ if dir = special_directive(name) return dir end - val = str do - # Most at-rules take expressions (e.g. @import), - # but some (e.g. @page) take selector-like arguments - expr || selector - end + # Most at-rules take expressions (e.g. @import), + # but some (e.g. @page) take selector-like arguments + val = str {break unless expr} + val ||= CssParser.new(@scanner, @line).parse_selector_string node = node(Sass::Tree::DirectiveNode.new("@#{name} #{val}".strip)) if tok(/\{/) node.has_children = true block_contents(node, :directive) @@ -642,14 +641,13 @@ def term unless e = tok(NUMBER) || tok(URI) || function || - interp_string || + tok(STRING) || tok(UNICODERANGE) || tok(IDENT) || - tok(HEXCOLOR) || - interpolation + tok(HEXCOLOR) return unless op = unary_operator @expected = "number or function" return [op, tok(NUMBER) || expr!(:function)] end