I almost got brain aneurysm thinking that the query syntax of tree-sitter and ast-grep differ.
Fortunately that's not the case, but - contrary to Internet wisdom - query syntax is not compatible between languages (parsers).
Also, ast-grep's Playground is insanely useful:
1/2
06.11.2025 16:16 โ ๐ 2 ๐ 1 ๐ฌ 1 ๐ 0
#ast_grep_trick ast-grep's rule is heavily inspired by CSS selectors. The rule `identifier` node is `inside` the node `call_expression` is something similar to `call_expression > identifier`
28.07.2025 03:19 โ ๐ 2 ๐ 0 ๐ฌ 0 ๐ 0
ast-grep is my personal hobby project, and all user feedback, whether good or bad, is voluntary. I don't request comments from users.
If you see statements that ast-grep's community is attacking others, they are fake rumors, or more precisely, narrative trickery.
15.07.2025 04:55 โ ๐ 2 ๐ 0 ๐ฌ 1 ๐ 0
ast-grep | structural search/rewrite tool for many languages
ast-grep is a fast and polyglot tool for code structural search, lint, rewriting at large scale.
ast-grep | structural search/rewrite tool for many languages https://ast-grep.github.io/
What on earth!
You can grep-replace parts of your code-base, but instead of string matching, you write AST matching expressions? That's wild.
09.07.2025 17:38 โ ๐ 2 ๐ 1 ๐ฌ 0 ๐ 0
Playground | ast-grep
ast-grep playground is an online tool that lets you explore AST, debug custom lint rules, and inspect code rewriting with instant feedback.
ใชใๅคฑ็คผใใพใใ
ใพใๆฉไผใใใใฐใLinterใฎast-grepใ่ฉฆใใฆใฟใฆใฏใใใใงใใใ๏ผ
OXCใฎ้ใใซใฏๅใณใพใใใใBiomeใใใใฃใใ้ใใงใใใใซใผใซไฝๆใใใ็ฐกๅใ ใจๆใใพใใ
Playgroundใใใฃใจๅฝนใซ็ซใกใพใ๏ผ
ast-grep.github.io/playground.h...
09.07.2025 03:13 โ ๐ 4 ๐ 1 ๐ฌ 1 ๐ 0
YouTube video by SunskyXH
ast-grep.el demonstration
ast-grep.el: Emacs meets structural search
www.youtube.com/watch?v=Bdua...
27.06.2025 15:43 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
it is a correct rule and verified by code example. (also approved from ast-grep author)
23.06.2025 18:46 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
letting AI write an ast-grep rule for me.
I'm using cursor, ast-grep mcp tool, custom cursor rule and gemini-2.5pro
19.06.2025 18:15 โ ๐ 2 ๐ 0 ๐ฌ 1 ๐ 0
What should your mutexes be named?
What should your mutexes be named?
gaultier.github.io/blog/what_sh...
#programming #golang #structural-search #awk
10.06.2025 06:30 โ ๐ 1 ๐ 1 ๐ฌ 0 ๐ 0
ast-grep rule cheat sheet
15.06.2025 13:57 โ ๐ 2 ๐ 0 ๐ฌ 0 ๐ 0
Compare biomejs plugin with ast-grep in one picture: both syntax and speed.
04.06.2025 16:29 โ ๐ 2 ๐ 1 ๐ฌ 0 ๐ 0
One pic to compare ast-grep rule syntax with biome plugin syntax.
The example shows the rule no-implicit-bool-jsx-attr,
e.g. <div draggable /> => <div draggable={true} />
29.05.2025 14:03 โ ๐ 1 ๐ 1 ๐ฌ 0 ๐ 0
btw i use neovim + ghostty
05.05.2025 15:07 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
Solaris light + bat
05.05.2025 15:06 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
A proof of concept to run ast-grep via OXC parser
04.05.2025 21:36 โ ๐ 9 ๐ 1 ๐ฌ 1 ๐ 0
04.05.2025 17:33 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
ast-grep on current vim buffer
ast-grep on current vim buffer. GitHub Gist: instantly share code, notes, and snippets.
just some (probably filthy) vimscript to get ast-grep to run on the current buffer and update it
cc @hd-nvim.bsky.social ๐
22.04.2025 16:23 โ ๐ 3 ๐ 1 ๐ฌ 1 ๐ 0
amazing ๐
22.04.2025 21:37 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
Ohh I didn't see that ast-grep has a VSCode extension nowadays. This tool just keeps getting better. marketplace.visualstudio.com/items/?itemN...
18.04.2025 13:48 โ ๐ 20 ๐ 5 ๐ฌ 1 ๐ 0
ast-grepใฏ่ชๅใฟใใใซใฝใใใฆใงใขใฎใใผใธใงใณใขใใใไปฃๆฟๆกใธใฎ็งป่กใใใใใใใฎใซใฏๅฟ
ไฟฎ็ง็ฎใใใใใ
02.04.2025 23:20 โ ๐ 2 ๐ 1 ๐ฌ 0 ๐ 0
this use case is valid but does not fit in general AST design. composing a single node pattern + precedes/follows rules is better in terms of flexibility and genericity. e.g. babel/eslint does not have multiple-nodes API.
27.03.2025 21:48 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
what's your expectation here? returning a list of nodes?
26.03.2025 02:53 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Screenshot of some code. It reads
// Parse each JSON line
for line in stdout. lines () {
if let Ok(json) = serde_json:: from_str:: <Value>(line) {
if let Some(obj) = json.as_object() {
if let Some (reason) = obj-get ("reason") {
if reason == "compiler-message" {
if let Some (message) = obj. get ("message") {
if let Some (rendered) = message. get ("rendered") {
if let Some(spans) = message. get ("spans")
if let Some(spans) = spans.as_array() {
for span in spans i
if let Some (file_name) = span.get("-
if let Some(file_name) = file_n
but each line is intended four spaces from the previous line. The combination of indentation and syntax highlighting gives a pleasant rainbow effect. Thanks, ChatGPT.
๐ vibe coding ๐
26.03.2025 00:12 โ ๐ 41 ๐ 2 ๐ฌ 6 ๐ 0
Join the community and see upcoming events on https://rust.nyc
Webใไปไบใซใใฆใใใ ใฎ้ณๆฅฝใชใฟใฏ
Open source developer
๐จโ๐ป Bingo, create-typescript-app, ESLint, Flint, Mocha, OctoGuide, typescript-eslint...
๐ช Boston TS Club & SquiggleConf
โ Learning TypeScript (O'Reilly)
๐ Microsoft MVP
๐ TC39 Invited Expert
https://joshuakgoldberg.com
ใใญใฐใฉใใณใฐใ่ถฃๅณใงใใ
I eat broken English.
GitHub: http://github.com/ota-meshi
X: https://x.com/omoteota
dad | software engineer @github.com | core team member of oxc.rs | โ๏ธ
camchenry.com
Sr. Principal Engineer at Cloudflare by day, WebAssembly consultant by night.
You might also know me from my work on OSS tools and libraries (JS / Wasm / Rust) or Wasm DevRel at Google Chrome
๐ https://rreverser.com/
๐ท https://instagram.com/rreverser
โข JavaScript, TypeScript, web development
โข Blog: https://2ality.com
My main account is on Mastodon (you can follow via RSS): https://fosstodon.org/@rauschma
Contributing to the development of the tech landscape by organizing #OpenSource events: @jsnation.gitnation.org, @reactsummit.gitnation.org, & more.
Video recordings from past #JavaScript confs: https://gitnation.com
writes, bikes, makes val.town, writes macwright.com, open source, geo, music, sewing and other stuff.
twitter archive: https://bsky.app/profile/archive.macwright.com
@e18e.dev - chaijs.com - tinylibs - parse5 - unjs - @lit.dev core contrib - github.com/43081j / Focusing on ecosystem perf & tooling ๐ฅณ
Software nerd, cat enthusiast, pixel art noob, gamedev, playing with LLMs
Certified Nerd. Currently helping to keep the NASA GEOS ESM running at Goddard Space Flight Center. #HPC
posva - Frontend Nerd ๐น author of Vue Router, Pinia, VueFire โ Speaker โ
Vue.js core team โ ๐ช๐ธ๐ซ๐ท๐ฌ๐ง โ him
โ๏ธ Formerly @React.dev core (Forgetโจ), @ReactNative.dev ยท Architect, Xplat/Web/UI/PL @ByteDance ยท๐จโ๐ฌ ฮป.TaPL/FP/Compiler/VM/@TC39
Iโmโฆmanaging @vercel.com
https://github.com/sxzz โข ๐ณ๏ธโ๐ Gen Z โข indie OSS developer sponsored by @voidzero.dev
@vuejs.org @vite.dev @vue-macros.dev @vueuse.org @unjs.io @rolldown.rs elk.zone
ใพใฉใปใๅฅฝใใฎใพใฉใใฎใใกใณ
ใ้ก็ฎฑ๏ผ https://odaibako.net/u/kwg