acorn-jsx-walk
JSX support for Acorn Walk.
Install
npm install acorn-jsx-walk
Example
// Extend Acorn parser with JSXconst acorn = const jsx = const parser = acornParser // Extend Acorn walk with JSXconst walk = const extend = // Create AST from source containing JSXconst source = ` const a = 2 const fn = () => { const el = <div>Hello world!</div> return el }`const ast = parser // Finally...walk
Copyright 2019 Contributors
Open source under the MIT License.
Special thanks to @sderosiaux and @adrianheine.