perl6/doc/lib/X/Syntax/InfixInTermPosition

doc src
(title) class X::Syntax::InfixInTermPosition
    class X::Syntax::InfixInTermPosition does X::Syntax { }

 
Syntax error thrown when the parser expects a term, but finds an infix operator instead. For example
    1, => 2

 
dies with
    ===SORRY!===
    Preceding context expects a term, but found infix => instead

 

Methods

(head2) infix
    method infix() returns Str:D

 
Returns the symbol of the infix that was found in term position.

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: