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

Reply via email to