Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • This is certainly an idea from Smalltalk that has been lost for the ages.

    As originally designed in Smalltalk, I think that the category descriptions for methods were done using metadata (comments):

    "methods for parsing"
    ....
    "methods for error handling"
    ....

    The code browser would respect these comments scattered about the code and use that information to simplify the display in the code browser.

    Putting this information into the op tree sorta sounds good, but modifying the syntax of the language (th

    • Few things Parrot's doing structurally that may help:
      1. Docstrings as a guaranteed propery on everything. (Potentially empty mind, but guaranteed)
      2. Ties between the bytecode stream and the AST
      3. Ties between the bytecode stream/AST and the original source
      So while there's no guarantee that everything'll be there (someone might strip the bytecode) you should be able to look at a sub ref, grab a pointer to its AST, grab a pointer to the beginning of its source, and potentially see any documentation that's been attached to it.

      How this stuff is provided for, or represented, at the perl level is left as an exercise for Larry. :)