All Projects → estools → Esquery

estools / Esquery

Licence: other
ECMAScript AST query library.

Programming Languages

javascript
184084 projects - #8 most used programming language
ecmascript
72 projects

Labels

Projects that are alternatives of or similar to Esquery

Javaparser
Java 1-15 Parser and Abstract Syntax Tree for Java, including preview features to Java 13
Stars: ✭ 3,972 (+674.27%)
Mutual labels:  ast
Orgajs
parse org-mode content into AST
Stars: ✭ 417 (-18.71%)
Mutual labels:  ast
Qone
Next-generation web query language, extend .NET LINQ for javascript.
Stars: ✭ 463 (-9.75%)
Mutual labels:  ast
Detective
Find all calls to require() no matter how deeply nested using a proper walk of the AST
Stars: ✭ 387 (-24.56%)
Mutual labels:  ast
Remark
remark is a popular tool that transforms markdown with plugins. These plugins can inspect and change your markup. You can use remark on the server, the client, CLIs, deno, etc.
Stars: ✭ 4,746 (+825.15%)
Mutual labels:  ast
Cst
🌿 JavaScript Concrete Syntax Tree
Stars: ✭ 417 (-18.71%)
Mutual labels:  ast
Solhint
Solhint is an open source project created by https://protofire.io. Its goal is to provide a linting utility for Solidity code.
Stars: ✭ 363 (-29.24%)
Mutual labels:  ast
Mdast
Markdown Abstract Syntax Tree format
Stars: ✭ 493 (-3.9%)
Mutual labels:  ast
Rector
Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
Stars: ✭ 4,739 (+823.78%)
Mutual labels:  ast
Unist
Universal Syntax Tree used by @unifiedjs
Stars: ✭ 438 (-14.62%)
Mutual labels:  ast
I18nize React
Internationalize react apps within a lunch break
Stars: ✭ 389 (-24.17%)
Mutual labels:  ast
Php Parser
🌿 NodeJS PHP Parser - extract AST or tokens (PHP5 and PHP7)
Stars: ✭ 400 (-22.03%)
Mutual labels:  ast
Debundle
🗃 A javascript debundler. Takes a Browserify or Webpack bundle and recreates the initial, pre-bundled source.
Stars: ✭ 420 (-18.13%)
Mutual labels:  ast
Node Dependency Tree
Get the dependency tree of a module
Stars: ✭ 383 (-25.34%)
Mutual labels:  ast
Fantomas
FSharp source code formatter
Stars: ✭ 475 (-7.41%)
Mutual labels:  ast
Ratel Core
High performance JavaScript to JavaScript compiler with a Rust core
Stars: ✭ 367 (-28.46%)
Mutual labels:  ast
Elm Analyse
A tool that allows you to analyse your Elm code, identify deficiencies and apply best practices.
Stars: ✭ 418 (-18.52%)
Mutual labels:  ast
Escope
Escope: ECMAScript scope analyzer
Stars: ✭ 497 (-3.12%)
Mutual labels:  ast
Tenko
An 100% spec compliant ES2021 JavaScript parser written in JS
Stars: ✭ 490 (-4.48%)
Mutual labels:  ast
Tiny Compiler
A tiny compiler for a language featuring LL(2) with Lexer, Parser, ASM-like codegen and VM. Complex enough to give you a flavour of how the "real" thing works whilst not being a mere toy example
Stars: ✭ 425 (-17.15%)
Mutual labels:  ast

ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:

demo

The following selectors are supported:

  • AST node type: ForStatement
  • wildcard: *
  • attribute existence: [attr]
  • attribute value: [attr="foo"] or [attr=123]
  • attribute regex: [attr=/foo.*/] or (with flags) [attr=/foo.*/is]
  • attribute conditions: [attr!="foo"], [attr>2], [attr<3], [attr>=2], or [attr<=3]
  • nested attribute: [attr.level2="foo"]
  • field: FunctionDeclaration > Identifier.id
  • First or last child: :first-child or :last-child
  • nth-child (no ax+b support): :nth-child(2)
  • nth-last-child (no ax+b support): :nth-last-child(1)
  • descendant: ancestor descendant
  • child: parent > child
  • following sibling: node ~ sibling
  • adjacent sibling: node + adjacent
  • negation: :not(ForStatement)
  • has: :has(ForStatement)
  • matches-any: :matches([attr] > :first-child, :last-child)
  • subject indicator: !IfStatement > [name="foo"]
  • class of AST node: :statement, :expression, :declaration, :function, or :pattern

Build Status

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].