Expand description
This language’s Switch row.
Constants§
- CALLABLE
- Every kind this row marks
callableorcallable_when, gates aside. - CHAIN_
GATED - Whether any owner carries a
gated_by/text_gated_bygate or anopens_byfn that is not markedno_chain, or anunder/not_underparent list (#1794) — the row may read the chain it is handed throughowns,pays_at_wrapperor the table’sopens_spacefold. A forward that hands the row a known-empty chain pins that this staysfalse(#1793). It says nothing ofcallable_when,pays_itself_whenor a payer’s gate, which onlyis_callableandpays_at_leafread. - EXCLUDED
- Kinds the row’s author considered and rejected, with why.
- LEAF_
KINDS - Every kind
pays_at_leaf_kindcan answertruefor, gates aside: the declared payers plus thepays_itselfowners on a split row; every owner on a plain row; none underpays never. A consumer that reads several rows’ leaves asserts at build time that two tiers cannot fire on one kind (impl_cyclomatic_rows!, #1697). - OWNERS
- Every kind this row declares as owning the construct.
- PAYERS
- Every kind this row declares as paying for it.
- PAYS_
NEVER - Whether the construct has owners but no paying node at all.
- PROJECT
- The field holding an owner’s paying token, where the row declares one.
- TEXT_
GATED - Whether any owner is
text_gated_by— the row reads the bytes it is handed. A consumer that asks the row with none, as the byte-lessCheckerspellings do while handing the walk’s chain through, pins that this staysfalseand fails the day it does not, instead of missing the owner. - WRAPS
- Interpolation child kinds a
StringLitowner can hold.
Functions§
- is_
callable - Whether
nodeis acallableowner of the construct — a named function, forChecker::is_func— under its gate. - is_
callable_ kind is_callablewithnode’s kind id already read, asowns_kindis toowns.- lists_
kind - Whether the row names
kindamong its owners, gates aside: the byte-less spelling ofowns. Spelled as a chain of compares, notOWNERS.contains:<[u16]>::containsis an out-of-line loop over a runtime-length slice, which LLVM cannot fold into the kindswitcha consumer dispatches on, while the chain becomes case labels of it (#1697). - owns
- Whether
nodeowns the construct. - owns_
kind ownswithnode’s kind id already read, for a caller that asks several rows about one node:kind_id()is an FFI call per read.- owns_
via - Whether
nodeowns the construct through the payer of kindpayer: for a consumer that scores only one of a row’s payers (C#’s??but not its conditional access), asked of the projection once. - pays_
at_ leaf - Whether
nodeis the token a counting arm fires on: a declared payer, or an owner that pays for itself. With nopayslist the owners are the paying nodes; withpays never, nothing is. - pays_
at_ leaf_ kind pays_at_leafwithnode’s kind id already read.- pays_
at_ token_ kind - Whether
nodeis a declared payer paying for the construct —pays_at_leaf_kindwithout thepays_itselfowners, which pay at the leaf but have no token to bill. What a token-billing consumer (Halstead) reads. - pays_
at_ wrapper - Whether
nodeis the owning node, for a consumer that pays at the wrapper rather than at its token. Equal toownsunless the row sayspays never. - project
- The child of an owner that pays for it: the owner’s
declared
projectfield, or — where the row declares none, or the grammar gives this owner no such field (Java’sinstanceof_expressioncarries its keyword as a bare child) — its first child whose kind is a declared payer.Nonewhen neither holds, which for a declared owner is a row defect.