Menu

#1791 Fix Perl subroutine missing proto symbol, also removed dynamic array

Bug
closed-fixed
5
2016-01-18
2015-12-11
No

A minor tweak for LexPerl.
(b) Removed the dynamic array here too.
(a) Added a missing symbol (the underscore) for subroutine prototypes. A careful reading of [1] revealed that the _ is a symbol too. LexPerl.cxx is attached. Subroutine prototypes was introduced in 5.14. Future issue => However, the prototype attribute for subroutines introduced in 5.20 breaks the lexing, though it's not a huge problem. That will be an update for another day.

Example found in bytes/heavy.pl:

sub length (_) {
    BEGIN { bytes::import() }
    return CORE::length($_[0]);
}

[1] http://perldoc.perl.org/perlsub.html#Prototypes

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2015-12-12
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2015-12-12

    Looks reasonable. Committed as [ba8926].

     

    Related

    Commit: [ba8926]

  • Neil Hodgson

    Neil Hodgson - 2016-01-18
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.