mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 05:41:14 +01:00
faa86b697c
Arguments are still optional since they may be constructed for user-defined arguments.
25 lines
768 B
Dart
25 lines
768 B
Dart
// Copyright 2016 Google Inc. Use of this source code is governed by an
|
|
// MIT-style license that can be found in the LICENSE file or at
|
|
// https://opensource.org/licenses/MIT.
|
|
|
|
import 'package:source_span/source_span.dart';
|
|
|
|
import '../../../utils.dart';
|
|
import '../../../visitor/interface/expression.dart';
|
|
import '../expression.dart';
|
|
|
|
class MapExpression implements Expression {
|
|
final List<List<Expression>> pairs;
|
|
|
|
final FileSpan span;
|
|
|
|
MapExpression(Iterable<Pair<Expression, Expression>> pairs, this.span)
|
|
: pairs = new List.unmodifiable(pairs);
|
|
|
|
/*=T*/ accept/*<T>*/(ExpressionVisitor/*<T>*/ visitor) =>
|
|
visitor.visitMapExpression(this);
|
|
|
|
String toString() =>
|
|
'(${pairs.map((pair) => '${pair.first}: ${pair.last}').join(', ')})';
|
|
}
|