Parrot Parrot Compiler Toolkit #56

Defining an operation

Once the parser knows about an operator token, we need to define what it does

Operators that correspond to Parrot opcodes use 'is pirop':

##  exponentiation
proto infix:<**>
    is tighter(infix:<*>)
    is pirop('pow') { ... }

Operators corresponding to PAST::Op nodes use 'is pasttype':

## short-circuit or
proto infix:<||> is pasttype('unless') { ... }

## short-circuit and
proto infix:<&&> is pasttype('if') { ... }
Copyright © 2009
http://www.pmichaud.com/2009/pres/