ESPARSE(1)

πŸ’– ESPARSE(1) πŸ’–

okay bestie, welcome to esparse β€” the ECMAScript Parser using Esprima ✨ it's giving "I read your JavaScript and I have opinions" and honestly? iconic.


🌸 NAME 🌸

esparse β€” ECMAScript Parser using Esprima πŸ¦‹

like. she parses. she's an ECMAScript parser. she uses Esprima. that's the whole vibe, no notes πŸ’…


✨ DESCRIPTION ✨

πŸŽ€ Usage:

esparse [options] file.js

so you hand her a file.js and a pile of [options], and she does her little parser thing. simple. gorgeous. main character energy fr fr 😌

πŸ‘‘ Available options:

  • --comment β€” gathers all line and block comments into an array πŸ’¬ like, every comment you left in there (yes, even the // TODO: fix this one from 2019) gets scooped up together.
  • --loc β€” includes line-column location info for each syntax node πŸ“ so you know exactly where in the file every node is chilling. very "I know where you live" of her.
  • --range β€” includes an index-based range for each syntax node πŸ”’ character offsets, bestie, not line numbers. different flavor of knowing where things are.
  • --raw β€” displays the raw value of literals πŸ“ the literal, as written, untouched. no glow-up, no interpretation.
  • --tokens β€” lists all tokens in an array πŸ”₯ the whole token stream, laid out flat. it's giving receipts.
  • --tolerant β€” tolerates errors on a best-effort basis 🫢 it's experimental, so like… she'll try her best, but no promises, okay? don't come for her.
  • -v, --version β€” shows program version πŸ‘‘ the classic. the little "who am I" check-in.

ngl, if you're leaning on --tolerant, just know it's flagged experimental in the source β€” so it's a vibe, not a guarantee. don't be shocked if things get messy 😭

πŸ¦‹ that's the whole page, bestie πŸ¦‹

this gorgeous little manual is from the ECMAScript Parser crew, dated June 2016 β€” and it lives in the User Commands section of the manual as ESPARSE(1). slay, parse, periodt πŸ’…βœ¨πŸŽ€