Skip to main content

head_of

Function head_of 

Source
pub fn head_of(func: &Func, inst: Idx<InstData>) -> Option<&'static str>
Expand description

What an instruction is called in a rule file, or nothing if the rules have no name for it.

The one function here that a caller with an Inst and no Terms wants, which is anything reporting on a rule rather than matching one.

The name carries the width, because a rule file that did not say how wide a term is would be a file whose reader has to look at the line above to find out. Which widths there are names for is the rule language’s business and not this crate’s: an instruction at a width nothing is written about has no name here, and the answer to it is that no rule matches.