turn bash AST back into code
This module will take an AST and add a property to each node named source
. This attribute when accessed will return the code value of the node.
npm install bash-codegen
bash-codegen
will directly edit the AST, to get the bash representation of the AST node, access the source property.
const codegen = require('bash-codegen');
const parsed = codegen(ast).commands.map((code) => {
return code.source + '\n';
}).join('');
When making code changes, please add details to the CHANGELOG.md
file under the section ## Unreleased
, if it doesn't exist, please add it.
example
## Unreleased
- changed the way something works // each change is a different bullet