Built for Power
A plethora of features for near-maximum control.
By a programmer for programmers.
Match most structural statements, from variable declarations to function calls and JSX attributes.
Learn a minimal syntax and gain access to dozens of selectors and operators – functions that match the syntactic elements of the language and control the scanner:
(id) (str) (num) (bool) (regex) (null) (fun) (var) (call) (mem) (arr) (el) (obj) (prop) (jsx) (attr) (child) (:and) (:or) (:not) (:into) (:replace) (:capture) (:ref) (:span) (:inside) (:outside)
Combine those functions and many more to form elaborate queries.
If you're used to writing your own AST programs, you no longer have to consult dry manuals or worry about missing part of the spec.
Display precise portions of matching statements, like the value of a JSX element attribute, or the first argument to a function call.
Find statements at or under a specific lexical scope, like the global module's.
Follow a literal value through any of its bindings. If you're looking for the number 4, and somewhere declares that let x = 4, SYNG will show you both 4 and x.
Use regular expressions to match wider sets of values. Ideal for when your target is not clear or difficult to enumerate.
Search literal source code for a word or pattern. Unlike a text-based search, formatting and insignificant tokens (e.g. comments) are disregarded. Can be used as a last resort for when your target is unknown.
Search for values that may appear across different types, like a word in String or Template literals, or an object property of a certain name.
Form unions, intersections and negations of selectors to describe your target with the utmost precision.
Follow imported identifiers to find their use in other statements, like a function call.
SYNG is fast. It's written in Rust and uses a highly-tuned algorithm. On a modern MacBook, it can scan a mixture of JavaScript and TypeScript files at a rate of 3000 files or 200,000 LOC per second.
