Callable.fromSignature constructor

  1. String signature,
  2. Value callback(
    1. List<Value> arguments
  3. {bool requireParens = true}

Creates a callable with a single signature and a single callback.

Throws a SassFormatException if parsing fails.


factory Callable.fromSignature(
    String signature, Value callback(List<Value> arguments),
    {bool requireParens = true}) {
  var (name, declaration) =
      parseSignature(signature, requireParens: requireParens);
  return BuiltInCallable.parsed(name, declaration, callback);