BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2019-10-15

class X::Syntax::Malformed

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

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

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
Code

produces

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

Methods§

method what§

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

Returns a description of the thing that was being parsed.