I can write a custom dialect attribute printer for the following:
#foo.bar<0> : i32
The operation parser will look ahead and optionally parse the colon-type. But if my dialect attribute printer is just
printer << '<' << getValue() << '>';
The output is
#foo.bar<0>
I have to manually print the type, but there’s no way to print it the same way it’s parsed, because
printer << '<' << getValue() << "> : " << getType();
Results in
#foo<"bar<0> : i32">
Is this an oversight or an intentional design decision? The dialect attribute parser supports parsing ahead to get an optional type, but the printer does not.