Language Parsers
Overview
Synapses includes 49+ AST-based parsers that extract structural information from source code. Parsers are organized into three tiers based on language importance and adoption.
All parsers use tree-sitter for accurate, fast parsing. They extract functions, methods, classes, interfaces, and relationships (CALLS, IMPLEMENTS, IMPORTS, EMBEDS, etc.).
Tier 0 — Core Languages
Essential languages supported out of the box for every project.
| Language | File Extensions | What’s Extracted |
|---|---|---|
| Go | .go | Functions, methods, structs, interfaces, CALLS, IMPLEMENTS, EMBEDS |
| TypeScript | .ts, .tsx | Functions, classes, interfaces, decorators, CALLS, IMPLEMENTS |
| JavaScript | .js, .jsx, .mjs | Functions, classes, CALLS, IMPORTS |
| Python | .py | Functions, classes, decorators, CALLS, IMPORTS |
| Java | .java | Classes, methods, interfaces, CALLS, IMPLEMENTS |
| C | .c, .h | Functions, structs, CALLS |
| C++ | .cpp, .hpp, .cc | Classes, methods, templates, CALLS, IMPLEMENTS |
| C# | .cs | Classes, methods, interfaces, CALLS, IMPLEMENTS |
| JSON | .json | Key-value structure, config entries |
| YAML | .yaml, .yml | Key-value structure, config entries |
| Dockerfile | Dockerfile | Stages, base images, DEPENDS_ON |
| SQL | .sql | Tables, views, procedures |
| Go modules | go.mod, go.sum | Module dependencies, DEPENDS_ON |
| Package managers | package.json, requirements.txt, Cargo.toml | Dependencies |
| Makefile | Makefile | Targets, dependencies |
| Shell/Bash | .sh, .bash | Functions, CALLS |
| TOML | .toml | Config structure |
| INI | .ini, .cfg | Config structure |
Tier 1 — Extended Languages
Advanced language support with specialized features.
| Language | File Extensions | Special Features |
|---|---|---|
| Rust | .rs | Traits, impl blocks, EMBEDS for trait implementations |
| Ruby | .rb | Classes, modules, mixins |
| PHP | .php | Classes, interfaces, traits |
| Kotlin | .kt, .kts | Data classes, sealed classes, coroutines |
| Scala | .scala | Traits, case classes, implicits |
| Elixir | .ex, .exs | Modules, functions, protocols, behaviours |
| Erlang | .erl | Modules, functions, behaviours |
| Clojure | .clj, .cljs | Namespaces, functions, protocols |
| Haskell | .hs | Type classes, instances, modules |
| F# | .fs, .fsi | Modules, types, discriminated unions |
| Dart | .dart | Classes, mixins, extensions |
| Groovy | .groovy | Classes, closures |
| Terraform/HCL | .tf, .hcl | Resources, modules, variables, DEPLOYS edges |
| GraphQL | .graphql, .gql | Types, queries, mutations, subscriptions |
| Cue | .cue | Definitions, constraints |
Tier 2 — Specialized & Domain-Specific
Niche languages and domain-specific formats.
| Language | File Extensions | Use Case |
|---|---|---|
| Julia | .jl | Scientific computing |
| Lua | .lua | Scripting, game development |
| Perl | .pl, .pm | System administration |
| Lisp/Scheme | .lisp, .scm, .cl | Functional programming |
| Vim Script | .vim | Editor configuration |
| Elm | .elm | Frontend (Haskell-like) |
| OCaml | .ml, .mli | Systems programming |
| VHDL | .vhd, .vhdl | Hardware description |
| CMake | CMakeLists.txt | Build system |
| Bicep | .bicep | Azure infrastructure |
| Protobuf | .proto | API definitions, generates CONSUMES edges |
| WASM (WAT) | .wat | WebAssembly text format |
| OpenAPI/Swagger | .yaml, .json | API specifications, generates route nodes |
| Markdown | .md | Documentation, generates section nodes + EXPLAINS edges |
| HTML | .html | Web pages |
| CSS | .css | Stylesheets |
| XML/SVG | .xml, .svg | Data/graphics |
| Jsonnet | .jsonnet | Templated JSON |
Auto-Detection
Parsers are automatically selected based on file extension. You don’t need to configure which parsers to use — Synapses detects your project’s languages during indexing.
What Parsers Extract
For each file, parsers produce:
- Nodes: Functions, methods, structs, interfaces, classes, variables
- Edges: CALLS (function invocations), IMPLEMENTS (interface implementation), IMPORTS (module imports), EMBEDS (struct embedding), DEFINES (file→entity)
- Metadata: Export status, line numbers, signatures, documentation comments
- Synthetic nodes: Routes (from framework-specific patterns), sections (from documentation)