~/talk

Advanced JavaScript code search: Abstract Syntax Tree analysis

Talkat jsday 2024 · 2024-04-11..04-12· [developer-experience]
slides:none on file

Proof‑of‑concept builds a JavaScript code search by parsing files with Babel or Acorn into ASTs, flattening nodes to an array and indexing name/type/kind/parentId into an Orama in‑memory full‑text index, so queries return exact locations (example: find a const named FS where parent type is VariableDeclarator). Babel shows ~50M downloads/week so parsing is practical, results return file positions reliably, and the demo suggests adding AI for pattern detection.

AI-written summary · about

  1. 0:00JavaScript AST analysis intro
  2. 7:39JavaScript engines parsing
  3. 10:10What is an AST
  4. 13:23AST in tools
  5. 16:39Advanced AST code search
  6. 23:54AST meets AI
  7. 25:19Resources and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.