Ticket #812 (closed bug: fixed)

Opened 13 years ago

Last modified 12 years ago

PCT - PAST::Op::lvalue() is redundant

Reported by: Austin_Hastings Owned by: pmichaud
Priority: normal Milestone:
Component: PCT Version: 1.3.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

In Node.pir, PAST::Node defines its lvalue() as a passthru to 'attr'('lvalue', etc.), while PAST::Op, which has Node as its parent, (re-)defines lvalue() in the same way.

I believe this is unnecessary.

Change History

Changed 12 years ago by tcurtis

This redundancy is still present.

If it is removed, we do still need to retain the POD for the PAST::Op.lvalue method. Even though its implementation is the same as that of PAST::Node, the meaning of the attribute is different.

Compare:

=item lvalue([flag])

Get/set the C<lvalue> attribute, which indicates whether this
variable is being used in an lvalue context.

=cut

to

=item lvalue([flag])

Get/set whether this node is an lvalue, or treats its first
child as an lvalue (e.g., for assignment).

=cut

Changed 12 years ago by kthakore

Here is a patch for the requested deletion and pod combination.  http://nopaste.snit.ch/21477

Changed 12 years ago by tcurtis

That patch is not exactly correct. The POD for PAST::Op.lvalue needs to stay even though PAST::Op.lvalue isn't necessary. PAST::Op's lvalue attribute has a different meaning from PAST::Node's, so the documentation should differ.

Changed 12 years ago by kthakore

New patch updated. All test pass.  http://nopaste.snit.ch/21480

Changed 12 years ago by chromatic

  • status changed from new to closed
  • resolution set to fixed

Thanks, applied in r47839.

Note: See TracTickets for help on using tickets.