Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raku-community-modules/corehackers-q
Raku QAST Visualizer
https://github.com/raku-community-modules/corehackers-q
raku
Last synced: about 1 month ago
JSON representation
Raku QAST Visualizer
- Host: GitHub
- URL: https://github.com/raku-community-modules/corehackers-q
- Owner: raku-community-modules
- License: artistic-2.0
- Created: 2018-01-07T22:18:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-14T13:01:59.000Z (about 1 year ago)
- Last Synced: 2023-10-15T22:41:52.575Z (about 1 year ago)
- Topics: raku
- Language: Raku
- Homepage:
- Size: 216 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Actions Status](https://github.com/raku-community-modules/CoreHackers-Q/workflows/test/badge.svg)](https://github.com/raku-community-modules/CoreHackers-Q/actions)
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:
* Control-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:
[An example](example.png)
USAGE
=====Usage:
q a '[ ...]'
q o '[ ...]'`a` command
-----------```bash
$ 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
-----------```bash
$ 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
-----------```bash
$ q z raku -e 'say "hello"'
```Just runs the raku command as is. Mnemonic: "zero". This command exists simply to easily switch between ``a`/`o`` runs and plain raku runs.
----------------------------------------------------------------------------------------------------
Meta
----### 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
Originally Zoffix Znet, now maintained by the Raku Community Adoption Center.
### 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.