2016-08-27 11:06:15 +02:00
|
|
|
// 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-28 01:12:17 +02:00
|
|
|
import '../ast/sass.dart';
|
2016-08-27 11:06:15 +02:00
|
|
|
import '../callable.dart';
|
|
|
|
import '../value.dart';
|
|
|
|
|
|
|
|
typedef Value _Callback(List<Value> arguments);
|
|
|
|
|
|
|
|
class BuiltInCallable implements Callable {
|
|
|
|
final _Callback callback;
|
|
|
|
|
|
|
|
final String name;
|
|
|
|
final ArgumentDeclaration arguments;
|
|
|
|
|
|
|
|
BuiltInCallable(this.name, this.arguments,
|
|
|
|
Value callback(List<Value> arguments))
|
|
|
|
: callback = callback;
|
|
|
|
}
|