Commits

Anonymous committed 248149c

remove nodes annotations

  • Participants
  • Parent commits abb0969

Comments (0)

Files changed (1)

src/parser/actions.pm

 class z2::Grammar::Actions;
 
 method TOP($/) {
-  my $past := PAST::Block.new( :node( $/ ) );
+  my $past := PAST::Stmts.new();
   for $<chardef> {
 =begin
     $past.push(PAST::Var.new(
 =cut 
     $past.push(
       mkcall(
-       PAST::Val.new( :value($_<character>),
-         :returns('String'),
-         :node($/)),
+       PAST::Val.new( :value($_<character>), :returns('String')),
        'declare')
     );
   }
 }
 
 method scene($/) {
-    my $past := PAST::Stmts.new(:name($<roman>), :node( $/ ) );
-    my $lbl := PAST::Op.new( 
-      :inline(""~$<roman>~":"), 
-      :node( $/ ) );
+    my $past := PAST::Stmts.new(:name($<roman>));
+    my $lbl := PAST::Op.new( :inline(""~$<roman>~":"));
     $past.push($lbl);
     for $<events> {
       $past.push( $( $_ ) );
 
 method branch($/) {
   dbg("branch:"~$<roman>);
-  my $res := PAST::Op.new( 
-    :inline("goto "~$<roman>), 
-    :node( $/ ) );
+  my $res := PAST::Op.new(:inline("goto "~$<roman>));
   make $res;
 }
 
 
 method line($/) {
     dbg("line:");
-    my $past := PAST::Stmts.new( :node( $/ ) );
+    my $past := PAST::Stmts.new();
     $past.push(
       PAST::Op.new(
         PAST::Var.new(
 
 method question($/, $key) {
   dbg("question:"~$<key>);
-  my $res := PAST::Op.new( 
-    :inline("goto "~$<roman>), 
-    :node( $/ ) );
+  my $res := PAST::Op.new(:inline("goto "~$<roman>)); 
+    
   make $res;
   my $res := mkcall0( $key );
   for $<value> {
 }
 
 method enters($/) {
-  my $past := PAST::Stmts.new(:node($/));
+  my $past := PAST::Stmts.new();
 
   for $<charlist><character> {
     my $res := mkcall( PAST::Val.new(
 }
 
 method exits($/) {
-  my $past := PAST::Stmts.new(:node($/));
+  my $past := PAST::Stmts.new();
 
   for $<charlist><character> {
     my $res := mkcall( PAST::Val.new(
 }
 
 method test($/, $k) {
-  my $test := PAST::Var.new( 
-    :name('the_condition'), 
-    :isdecl(0), 
-    :scope('package'),
-    :node( $/ ) );
-
-  make PAST::Op.new( 
-    $test,
-    $( $<branch> ),
-    :pasttype($k), 
-    :node($/) );
+  my $test := PAST::Var.new(:name('the_condition'),:scope('package'));
+  make PAST::Op.new( $test, $($<branch>), :pasttype($k));
 }
 
 method computation($/, $key) {
 }
 
 method binary($/, $key) {
-  my $res := PAST::Op.new( :name( $key ), :pasttype('call'), :node( $/ ) );
+  my $res := mkcall0( $key );
   for $<value> {
     $res.push( $( $_ ));
   }