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

EditButtonTip 2019-08-04

class X::Syntax::InfixInTermPosition

Compilation error due to an infix in term position

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

Syntax error thrown when the parser expects a term, but finds an infix operator instead.

For example

1, => 2;
Code

dies with

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

Methods§

method infix§

method infix(--> Str:D)
Code

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