AST (abstract syntax tree) parser
npm install @the-/ast@the-/ast
==========
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[bd_repo_url]: https://github.com/the-labo/the
[bd_npm_url]: http://www.npmjs.org/package/@the-/ast
[bd_npm_shield_url]: http://img.shields.io/npm/v/@the-/ast.svg?style=flat
AST (abstract syntax tree) parser
Installation
-----
``bash`
$ npm install @the-/ast --save
Usage
---------
`javascript
'use strict'
const { parse } = require('@the-/ast')
async function tryExample() {
const ast = parse('const a = 1 + 2')
console.log(ast) // -> AST Tree object
}
tryExample().catch((err) => console.error(err))
``
- global
- findByTypes(node,types)
- module:@the-/ast
- .analyzer
- .constants
- .finder
- .NodeTypes
- .parse(content,options)
- module
- .exports()
See API Guide for more detail
License
-------
This software is released under the MIT License.
Links
------
+ [THE Labo][the_labo_url]
[the_labo_url]: https://github.com/the-labo