dart-sass/lib/src/callable.dart

21 lines
851 B
Dart
Raw Normal View History

// 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.
2016-08-27 11:06:15 +02:00
export 'callable/built_in.dart';
export 'callable/user_defined.dart';
2016-10-10 05:57:10 +02:00
/// An interface for objects, such as functions and mixins, that can be invoked
/// from Sass by passing in arguments.
2016-08-27 11:06:15 +02:00
abstract class Callable {
2016-10-10 05:57:10 +02:00
/// The callable's name.
2016-08-27 11:06:15 +02:00
String get name;
2016-10-10 05:57:10 +02:00
// TODO(nweiz): I'd like to include the argument declaration on this interface
// as well, but supporting overloads for built-in callables makes that more
// difficult. Ideally, we'd define overloads as purely an implementation
// detail of functions, using a helper method. But that would need to
// duplicate a lot of the logic in PerformVisitor, and I can't find an elegant
// way to do that.
}