This commit is contained in:
Natalie Weizenbaum 2016-05-24 16:22:23 -07:00
parent 8a395d7f7b
commit 27a819243b
2 changed files with 17 additions and 1 deletions

View File

@ -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();

View File

@ -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;