All Projects → babel-utils → Ast Pretty Print

babel-utils / Ast Pretty Print

Licence: mit
A pretty printer for AST-like structures

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ast Pretty Print

Astpretty
Pretty print the output of python stdlib `ast.parse`.
Stars: ✭ 93 (-27.91%)
Mutual labels:  pretty-print, ast
React Ast
render abstract syntax trees with react
Stars: ✭ 160 (+24.03%)
Mutual labels:  babel, ast
Babylon
PSA: moved into babel/babel as @babel/parser -->
Stars: ✭ 1,692 (+1211.63%)
Mutual labels:  babel, ast
I18nize React
Internationalize react apps within a lunch break
Stars: ✭ 389 (+201.55%)
Mutual labels:  babel, ast
Astexplorer.app
https://astexplorer.net with ES Modules support and Hot Reloading
Stars: ✭ 65 (-49.61%)
Mutual labels:  babel, ast
Astexplorer
A web tool to explore the ASTs generated by various parsers.
Stars: ✭ 4,330 (+3256.59%)
Mutual labels:  babel, ast
Reshape
💠 transform html with javascript plugins
Stars: ✭ 314 (+143.41%)
Mutual labels:  babel, ast
Babel Plugin React Persist
Automatically useCallback() & useMemo(); memoize inline functions
Stars: ✭ 91 (-29.46%)
Mutual labels:  babel, ast
Babel
🐠 Babel is a compiler for writing next generation JavaScript.
Stars: ✭ 40,109 (+30992.25%)
Mutual labels:  babel, ast
Notes
♬ Notes from the @Babel Team (discuss in PRs)
Stars: ✭ 118 (-8.53%)
Mutual labels:  babel
Babel React Rollup Starter
A simple boilerplate for web apps with React, Babel, and Rollup.
Stars: ✭ 124 (-3.88%)
Mutual labels:  babel
Swiftprettyprint
Pretty print for Swift.
Stars: ✭ 118 (-8.53%)
Mutual labels:  pretty-print
Vue Starter
🐩 A boilerplate for HTML5, Vue, Vue Router, i18n, Tailwind, Windi, Netlify, and Vite.
Stars: ✭ 120 (-6.98%)
Mutual labels:  babel
Fast
Develop, build, deploy, redeploy, and teardown frontend projects fast.
Stars: ✭ 126 (-2.33%)
Mutual labels:  babel
Vue Spa Project
vue.js + vuex + vue-router + fetch + element-ui + es6 + webpack + mock 纯前端SPA项目开发实践
Stars: ✭ 118 (-8.53%)
Mutual labels:  babel
Mhy
🧩 A zero-config, out-of-the-box, multi-purpose toolbox and development environment
Stars: ✭ 128 (-0.78%)
Mutual labels:  babel
Asteval
minimalistic evaluator of python expression using ast module
Stars: ✭ 116 (-10.08%)
Mutual labels:  ast
Static Site Boilerplate
A better workflow for building modern static websites.
Stars: ✭ 1,633 (+1165.89%)
Mutual labels:  babel
Ast I18n
Easily migrate your existing React codebase to use i18n
Stars: ✭ 129 (+0%)
Mutual labels:  ast
Barebones
A barebones boilerplate for getting started on a bespoke front end.
Stars: ✭ 127 (-1.55%)
Mutual labels:  babel

ast-pretty-print

A pretty printer for AST-like structures

  • Super fast (useful for build tools)
  • Concise output (useful for debugging)
  • Consistent output (useful for snapshot testing)
import parser from 'parser';
import printAST from 'ast-pretty-print';

let code = `...`;
let ast = parser.parse(code);
let printed = printAST(ast);

console.log(printed);
Node "FunctionDeclaration"
  __clone: [Function __clone]
  async: false
  body: Node "BlockStatement" (1:29, 1:31)
    body: Array []
    directives: Array []
  expression: false
  generator: false
  id: Node "Identifier" (1:9, 1:10)
    name: "a"
  params: Array [
    Node "Identifier" (1:11, 1:18)
      name: "b"
      typeAnnotation: Node "TypeAnnotation" (1:12, 1:18)
          typeAnnotation: Node "StringLiteralTypeAnnotation" (1:14, 1:18)
              extra: Object {
                  "raw": "\"hi\"",
                  "rawValue": "hi",
                }
             value: "hi",
    Node "Identifier" (1:20, 1:21)
      name: "c",
    Node "RestElement" (1:23, 1:27)
      argument: Node "Identifier" (1:26, 1:27)
        name: "d",
  ]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].