# New Ticket Created by  Klaas-Jan Stol 
# Please include the string:  [perl #50500]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=50500 >


PAST::Var nodes have a required attribute :scope, which can take one of the
following values:

lexical
parameter
package
keyed


I propose to add a scope "attribute". The PAST::Var node should have one
child node, which evaluates to the object of the attribute.
an example, with a global object called foo, and an attribute called bar.
Typical HLL syntax is: foo.bar


my $obj := PAST::Var.new( :name("foo"), :scope("package"), :node($/) );
PAST::Var( $obj, :name("bar"), :scope("attribute"), :node($/) );

translates to:

$P10 = get_global "foo"
$P11 = getattribute $P10, "bar


Would this be useful for other HLLs? (I'm currently thinking of Ruby, where
instance variables (object attributes) are lexically different from other
identifiers.)
kjs

Reply via email to