Skip to content

Commit

Permalink
:pasttype<if> in Ep 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
tcurtis committed Jul 20, 2010
1 parent efd8502 commit 78b440b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/tutorial_episode_7.pod
Expand Up @@ -210,9 +210,9 @@ first child is always evaluated, and if true, the second child
(the C<then> block) is evaluated (remember, the third child -- the C<else>
clause -- is optional). It would be great to be able to implement the and
operator using a C<PAST::Op( :pasttype('if') )> node. Well, you can, using
the C<is pasttype> clause! Here's how:
the ":pasttype" option! Here's how:

proto 'infix:and' is tighter('infix:or') is pasttype('if') { ... }
token infix:sym<and> { <sym> <O('%conjunction, :pasttype<if>')> }

So what about the or operator? When evaluating an or-expression, the first
operand is evaluated. If it evaluates to true, then there's no need to evaluate
Expand Down

0 comments on commit 78b440b

Please sign in to comment.