From 2462f25d295f5e0a6ff8c682455bdf719d22d703 Mon Sep 17 00:00:00 2001 From: tcurtis Date: Fri, 16 Jul 2010 22:33:31 -0500 Subject: [PATCH] Update the tutorial's example code for the 'var' declaration's action methods. --- doc/tutorial_episode_5.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/tutorial_episode_5.pod b/doc/tutorial_episode_5.pod index 661dcf4..895005e 100644 --- a/doc/tutorial_episode_5.pod +++ b/doc/tutorial_episode_5.pod @@ -102,9 +102,9 @@ initialization expression. If the latter is missing, the variable's value defaults to the undefined value called "Undef". Let's see what the parse action looks like: - method variable_declaration($/) { + method statement:sym($/) { # get the PAST for the identifier - my $past := $( $ ); + my $past := $.ast; # this is a local (it's being defined) $past.scope('lexical'); @@ -116,7 +116,7 @@ looks like: if $ { # use the viviself clause to add a # an initialization expression - $past.viviself( $( $[0] ); + $past.viviself($[0].ast); } else { # no initialization, default to "Undef" $past.viviself('Undef');