mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-26 20:24:42 +01:00
Parens
This commit is contained in:
parent
8a395d7f7b
commit
27a819243b
@ -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();
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user