GithubHelp home page GithubHelp logo

Comments (2)

lizmat avatar lizmat commented on August 11, 2024

In RakuAST, pod blocks will appear as RakuAST::Doc::Block objects in RakuAST::StatementLists in the RakuAST tree. This brings a lot of opportunity for introspection.

  1. the "origins" framework will allow you to find out the origin of any RakuAST:: object, such as filename and line number.
  2. this gives you the option to read that file. However, you could also call .DEPARSE on the RakuAST object in question to get a clean source representation of that object (which may or may not be preferable)
  3. when rendering rakudoc from a RakuAST tree, you could also e.g. extract the RakuAST::Signature object, and deparse that to add to the rakudoc.
  4. the contents of RakuAST::Doc::Block are as close as possible to the original source (including any additional whitespace), with two exceptions:
  5. implicit code block parsing inside =begin pod / =end pod. These are already parsed as if they were part of an explicit =begin code / =end code block.
  6. table cell parsing parsed into RakuAST::Doc::Row objects, in which each cell still has any additional whitespace, which could e.g. as an implicit way to indicate right justification or centering.

and probably a lot more I couldn't think of now :-)

from problem-solving.

finanalyst avatar finanalyst commented on August 11, 2024

The suggestion was made based on the $=pod representation. But the RakuAST representation offers much more information

from problem-solving.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.