Specifying type_ref allows decoupling the specification of the type($foo) from its use in custom UserDirective.
This allows writing custom directives such as like:
let assemblyFormat = [{
`(` $inputs `:` type($inputs) `)`
...
custom<Foo>(
type_ref($inputs)
}];in which parseFoo can implement special behavior based on the type of inputs without having to parse it at the same time.
Could you also document what is the C++ type passed to the function that backs this directive? We have a list under "Custom directives" below.