develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33689 - branches/assign/compilers/pct/src/PAST

From:
pmichaud
Date:
December 8, 2008 19:49
Subject:
[svn:parrot] r33689 - branches/assign/compilers/pct/src/PAST
Message ID:
20081209034856.6F87BCB9AF@x12.develooper.com
Author: pmichaud
Date: Mon Dec  8 19:48:55 2008
New Revision: 33689

Modified:
   branches/assign/compilers/pct/src/PAST/Node.pir

Log:
[pct]: Throw an exception if setting an lvalue on PAST::Val.


Modified: branches/assign/compilers/pct/src/PAST/Node.pir
==============================================================================
--- branches/assign/compilers/pct/src/PAST/Node.pir	(original)
+++ branches/assign/compilers/pct/src/PAST/Node.pir	Mon Dec  8 19:48:55 2008
@@ -141,6 +141,22 @@
     .tailcall self.'attr'('value', value, has_value)
 .end
 
+=item lvalue([value])
+
+Throw an exception if we try to make a PAST::Val into an lvalue.
+
+=cut
+
+.sub 'lvalue' :method
+    .param pmc value           :optional
+    .param int has_value       :opt_flag
+    unless has_value goto normal
+    unless value goto normal
+    die "Unable to set lvalue on PAST::Val node"
+  normal:
+    .tailcall self.'attr'('value', value, has_value)
+.end
+
 =back
 
 =head2 PAST::Var



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About