Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CoreHackers::Q

QAST tree visualizer

DESCRIPTION

Installs q command line script that parses out QAST trees from a program and makes an HTML file from them.

The HTML page provides these extra features unavailable in plain raku --target=ast and raku --target=optimize output:

  • Click on individual tree nodes to collapse/expand them
  • Color coding: of sunk nodes, QAST::Want alternatives, static and non-static calls, etc.

Example output:

USAGE

    Usage:
      q a '[<args> ...]'
      q o '[<args> ...]'

a command

$ q a raku -e 'say "hello"' > out.html; google-chrome out.html

a stands for --target=ast and the args that follow is a raku invocation to run the script (the --target=ast argument will be inserted automatically).

The script will parse QAST generated by the given raku program and output an HTML file to STDOUT. View the file in any browser to examine the QAST tree.

o command

$ q o raku -e 'say "hello"' > out.html; google-chrome out.html

o stands for --target=optimize. Same as a, except parses --target=optimize QAST. Once again, you don't need to manually specify --target parameter.

z command

$ q z raku -e 'say "hello"'

Just runs the perl6 command as is. Mnemonic: "zero". This command exists simply to easily switch between a/o runs and plain raku runs.


REPOSITORY

Fork this module on GitHub: https://github.com/raku-community-modules/CoreHackers-Q

BUGS

To report bugs or request features, please use https://github.com/raku-community-modules/CoreHackers-Q/issues

AUTHOR

Zoffix Znet (http://perl6.party/)

LICENSE

You can use and distribute this module under the terms of the The Artistic License 2.0. See the LICENSE file included in this distribution for complete details.

The META6.json file of this distribution may be distributed and modified without restrictions or attribution.

About

Raku QAST Visualizer

Topics

Resources

License

Releases

No releases published

Packages

No packages published