SynapsesOS
Reference

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.

LanguageFile ExtensionsWhat’s Extracted
Go.goFunctions, methods, structs, interfaces, CALLS, IMPLEMENTS, EMBEDS
TypeScript.ts, .tsxFunctions, classes, interfaces, decorators, CALLS, IMPLEMENTS
JavaScript.js, .jsx, .mjsFunctions, classes, CALLS, IMPORTS
Python.pyFunctions, classes, decorators, CALLS, IMPORTS
Java.javaClasses, methods, interfaces, CALLS, IMPLEMENTS
C.c, .hFunctions, structs, CALLS
C++.cpp, .hpp, .ccClasses, methods, templates, CALLS, IMPLEMENTS
C#.csClasses, methods, interfaces, CALLS, IMPLEMENTS
JSON.jsonKey-value structure, config entries
YAML.yaml, .ymlKey-value structure, config entries
DockerfileDockerfileStages, base images, DEPENDS_ON
SQL.sqlTables, views, procedures
Go modulesgo.mod, go.sumModule dependencies, DEPENDS_ON
Package managerspackage.json, requirements.txt, Cargo.tomlDependencies
MakefileMakefileTargets, dependencies
Shell/Bash.sh, .bashFunctions, CALLS
TOML.tomlConfig structure
INI.ini, .cfgConfig structure

Tier 1 — Extended Languages

Advanced language support with specialized features.

LanguageFile ExtensionsSpecial Features
Rust.rsTraits, impl blocks, EMBEDS for trait implementations
Ruby.rbClasses, modules, mixins
PHP.phpClasses, interfaces, traits
Kotlin.kt, .ktsData classes, sealed classes, coroutines
Scala.scalaTraits, case classes, implicits
Elixir.ex, .exsModules, functions, protocols, behaviours
Erlang.erlModules, functions, behaviours
Clojure.clj, .cljsNamespaces, functions, protocols
Haskell.hsType classes, instances, modules
F#.fs, .fsiModules, types, discriminated unions
Dart.dartClasses, mixins, extensions
Groovy.groovyClasses, closures
Terraform/HCL.tf, .hclResources, modules, variables, DEPLOYS edges
GraphQL.graphql, .gqlTypes, queries, mutations, subscriptions
Cue.cueDefinitions, constraints

Tier 2 — Specialized & Domain-Specific

Niche languages and domain-specific formats.

LanguageFile ExtensionsUse Case
Julia.jlScientific computing
Lua.luaScripting, game development
Perl.pl, .pmSystem administration
Lisp/Scheme.lisp, .scm, .clFunctional programming
Vim Script.vimEditor configuration
Elm.elmFrontend (Haskell-like)
OCaml.ml, .mliSystems programming
VHDL.vhd, .vhdlHardware description
CMakeCMakeLists.txtBuild system
Bicep.bicepAzure infrastructure
Protobuf.protoAPI definitions, generates CONSUMES edges
WASM (WAT).watWebAssembly text format
OpenAPI/Swagger.yaml, .jsonAPI specifications, generates route nodes
Markdown.mdDocumentation, generates section nodes + EXPLAINS edges
HTML.htmlWeb pages
CSS.cssStylesheets
XML/SVG.xml, .svgData/graphics
Jsonnet.jsonnetTemplated 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:

  1. Nodes: Functions, methods, structs, interfaces, classes, variables
  2. Edges: CALLS (function invocations), IMPLEMENTS (interface implementation), IMPORTS (module imports), EMBEDS (struct embedding), DEFINES (file→entity)
  3. Metadata: Export status, line numbers, signatures, documentation comments
  4. Synthetic nodes: Routes (from framework-specific patterns), sections (from documentation)