diff --git a/lib/src/parser.dart b/lib/src/parser.dart index 19f30a3a..60873e9e 100644 --- a/lib/src/parser.dart +++ b/lib/src/parser.dart @@ -348,7 +348,22 @@ class Parser { } - Expression _parentheses() => throw new UnimplementedError(); + Expression _parentheses() { + var start = _scanner.state; + _expectChar($lparen); + _ignoreComments(); + if (!_isExpressionStart(_scanner.peekChar())) { + _expectChar($rparen); + return new ListExpression([], ListSeparator.none, + span: _scanner.spanFrom(state)); + } + + // TODO: support maps + var result = _expression(); + _expectChar($rparen); + return result; + } + Expression _unaryOperator() => throw new UnimplementedError(); Expression _number() => throw new UnimplementedError(); Expression _bracketList() => throw new UnimplementedError(); diff --git a/lib/src/value/list.dart b/lib/src/value/list.dart index ba695717..2a8f582d 100644 --- a/lib/src/value/list.dart +++ b/lib/src/value/list.dart @@ -20,6 +20,7 @@ class SassList extends Value { class ListSeparator { static const space = const ListSeparator._("space"); static const comma = const ListSeparator._("comma"); + static const none = const ListSeparator._("none"); final String name;