=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE class X::Syntax::Malformed

=SUBTITLE Compilation error due to a malformed construct (usually a declarator)

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

The Raku compiler throws errors of type C<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.

=for code :skip-test<compile time error>
my Int a;   # throws an X::Syntax::Malformed

produces

=for code :lang<text>
===SORRY!===
Malformed my
at -e:1
------> my Int ⏏a


=head1 Methods

=head2 method what

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

Returns a description of the thing that was being parsed.

=end pod
