class X::Syntax::Malformed does X::Syntax {}

The Raku compiler throws errors of type X::Syntax::Malformed when it knows what kind of declaration it is parsing, and encounters a syntax error, but can't give a more specific error message.

my Int a;   # throws an X::Syntax::Malformed

produces

===SORRY!===
Malformed my
at -e:1
------> my Int ⏏a

Methods§

method what§

method what(X::Syntax::Malformed:D: --> Str)

Returns a description of the thing that was being parsed.