bindableKind function

SceneParamKind? bindableKind(
  1. SceneNode node,
  2. String prop
)

The parameter kind prop of node can read, or null when no parameter can fill it — the table's kind, seen as a parameter's. A nested scene's argument reads a parameter of the kind the child declares it; a side of a quad is a number; a list, a choice and a style are things no parameter holds.

Implementation

SceneParamKind? bindableKind(SceneNode node, String prop) =>
    switch (resolveSceneKey(node, prop)) {
      ScenePropertyKey(:var prop) => prop.paramKind,
      ScenePartKey(:var prop, :var part) when prop.kind == ScenePropKind.args =>
        switch (node) {
          SceneRefNode r => switch (r.instance?.paramNamed(part)) {
            SceneParamDecl(kind: SceneParamKind.list) => null,
            SceneParamDecl(:var kind) => kind,
            null => null,
          },
          _ => null,
        },
      // Every side of every quad, and every axis of every face, is a number.
      ScenePartKey() => SceneParamKind.number,
      null => null,
    };