Skip to content

Language support ​

SigMap extracts signatures from 33 programming languages and formats using deterministic, zero-dependency extraction — no Tree-sitter, no native binaries. Every extractor is a single JS file. No grammar files to download. Runs deterministically on any machine with Node.js 18+.

Stats: 38 languages · 25 signatures per file in the context file, up to 200 in the retrieval index · 0 npm packages

Not every language gets the same depth — the tiers (AST / anchored regex / pattern-heuristic), the truncation caps, and the known regex gaps are stated plainly in KNOWN_LIMITATIONS.md (v8.26.1), drift-locked by a guard test.

How extraction works ​

Full source code goes in. Only public shapes come out. Bodies, comments, imports, and private members are stripped entirely.

TypeScript example — input (1,240 tokens):

typescript
export interface User {
  id: string;
  email: string;
  createdAt: Date;
}

export class UserService {
  private db: Database;

  async findById(id: string): Promise<User> {
    // implementation...
  }

  async create(dto: CreateDto): Promise<User> { ... }

  private _validate(d: any) { ... }
}

Output (62 tokens) — 95% reduction:

export interface User
export class UserService
  async findById(id: string): Promise<User>
  async create(dto: CreateDto): Promise<User>

# private _validate stripped
# bodies stripped
# comments stripped

What's extracted — and what isn't ​

Extracted ​

  • Exported / public classes with public methods
  • Exported / public functions and procedures
  • Exported types, interfaces, and enums
  • Internal classes (unexported, lower priority)
  • Internal functions (unexported, lower priority)
  • Method signatures — name, parameters, return type
  • Generic type parameters and constraints
  • Async / await marker where language supports it

Never extracted ​

  • Function and method bodies (everything inside {})
  • Comments — //, /*, #, """, ''' in all languages
  • Import and require statements
  • Variable declarations that aren't type definitions
  • Private class members (_prefix, # prefix, private keyword)
  • Test files (*.test.*, *.spec.*, *_test.*)
  • Generated files (*.pb.*, *.generated.*)
  • Any credential, key, token, or secret pattern

All 38 languages ​

Recall against each language's own parser is measured for Python and Ruby (the Python and Ruby rows link to the recall report); the other languages are listed there as unmeasured.

LanguageExtensionsExtracts
TypeScript.ts .tsxexport function, export class, interface, type alias, enum, methods, generics
JavaScript.js .jsx .mjs .cjsexport function, export class, arrow functions, module.exports, methods
Python.py .pywdef functions, class, methods, async def, @dataclass, @property (recall)
Java.javapublic class, interface, enum, public methods, annotations
Kotlin.kt .ktsfun, class, data class, interface, object, sealed class
Go.gofunc, type struct, interface, method receivers, type alias
Rust.rspub fn, pub struct, trait, enum, impl methods, pub type
C#.cspublic class, interface, enum, public methods, record, struct
C / C++.c .cpp .h .hpp .ccfunctions, class / struct, public methods, template, typedef
Ruby.rb .rakedef, class, module, attr_accessor, include / extend (recall)
PHP.phpfunction, class, interface, trait, public methods
Swift.swiftfunc, class / struct, protocol, enum, extension
Dart.dartclass, void / return type functions, abstract class, mixin, methods
Scala.scala .scdef, class, object, trait, case class, methods
Vue.vuedefineProps, defineEmits, composables, component name, script functions
Svelte.svelteexport let props, export function, script functions, component name
HTML.html .htmpage title, h1–h3 headings, form id/action, script src, link rel
CSS / SCSS / LESS.css .scss .sass .lessCSS variables (--), @mixin, @function, media queries, top-level selectors
YAML.yml .yamltop-level keys, CI job names, K8s kind/name, second-level keys
Shell.sh .bash .zsh .fishfunction names, exported vars, script description
DockerfileDockerfile Dockerfile.*FROM image, EXPOSE ports, ENTRYPOINT, multi-stage names, ARG / ENV keys
GraphQL.graphql .gqltype, interface, input, enum, union, scalar, extend type, query / mutation
SQL.sqlCREATE TABLE, VIEW, FUNCTION, PROCEDURE, INDEX, TRIGGER, CREATE TYPE
Terraform.tf .tfvarsresource, data, module, variable, output, provider, locals
Protocol Buffers.protomessage, enum, service, rpc, syntax, package
R.R .rfunction, S4 class / method, R6 class, S7 class, roxygen hints
TOML.tomltop-level tables ([table]), arrays of tables ([[array]]), key groups
Properties.propertiesdotted-key namespaces, prefix groups (spring., db., server.*)
XML.xmlroot element, bean/route/kind, top-level named elements, Spring beans
Markdown.mdh1–h3 headings, code-fence languages, link titles
GDScript.gdclass definition, extends, signal, enum, constant, function definition
Lua.luafunction, module-table methods (M.name / M:name), local functions, require hints, LDoc hints
Elixir.ex .exsdefmodule, def/defp/defmacro, @spec return hints, @doc hints, alias/import deps
Astro.astrofrontmatter via the TS extractor (Props, functions, consts), Astro.props destructure, component usages
PowerShell.ps1 .psm1 .psd1function, filter, workflow, param blocks, [CmdletBinding], PS5 class, methods, enum, Export-ModuleMember, .psd1 manifest
Objective-C.m .mm (and .h that declares ObjC)@interface, @protocol, @implementation, categories, @property, class/instance methods, typedef NS_ENUM / NS_OPTIONS, typedef struct, C functions, C++ classes in .mm
CI / pipelines.github/workflows/* action.yml .gitlab-ci.yml .circleci/config.yml azure-pipelines.yml bitbucket-pipelines.yml .drone.yml Jenkinsfile docker-compose.ymlworkflow name and triggers, jobs with runner / needs / if / matrix / environment, steps as real commands, referenced secrets, compose services — routed by path, not extension

Objective-C: three things worth knowing (v8.62.0) ​

.m is shared with MATLAB and Octave. A .m file with no Objective-C marker (@interface, @implementation, @protocol, @property, @end, #import, NS_ENUM, NS_OPTIONS) is not Objective-C, and goes to the generic extractor instead of producing Objective-C-shaped guesses.

.h stays mapped to C/C++. The C++ extractor checks the comment-stripped text for @interface / @implementation / @protocol / #import and hands the file to the Objective-C extractor when it finds one. A C++ header that only mentions @interface in a comment is still C++.

Only declarations are read. Methods and C functions are matched at brace depth 0, so nothing inside a body can surface as a signature — return CGRectMake(0, 0, w, h); is not a prototype and a - b is not a method. Depth follows #if / #else branches, and a method anchors to its real closing brace at any length:

text
@implementation UserService  :43-64
  + (instancetype)serviceWithRepo:(id<Repository>)repo  :45-47
  - (instancetype)initWithRepo:(id<Repository>)repo  :49-54
  - (void)createUser:(CreateUserDto *)dto completion:(void (^)(User *user, NSError *error))completion  :60-62
static inline BOOL isValidId(NSString *identifier)  :70-72

Not extracted: ivar blocks, @synthesize, forward declarations (@protocol FooDelegate;, @class Foo;), and methods generated by a macro (RCT_EXPORT_METHOD(...)). Each container lists up to 120 members and each file up to 200 signatures; a cap is always disclosed as … +N more.

Extraction quality tiers ​

Mature ​

TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, Ruby, PHP, Swift, C#, C++, Dart, Scala.

These extractors cover the public shapes most developers care about day to day and are the most proven in the benchmark set.

Stable ​

Vue, Svelte, GraphQL, SQL, Terraform, Protobuf, YAML, Shell, Dockerfile, TOML, XML, Properties, Markdown, R, GDScript, PowerShell, Objective-C.

These are reliable for structure-first context, but some ecosystems have more variation in how teams write files.

Fallback or shape-level ​

HTML and CSS-family files are intentionally shallower. They capture the top-level structure that helps navigation, not full semantic behavior.

Contributing a new language ​

Adding a language means contributing one extractor file. Follow the extractor contract, ensure all tests pass, and open a PR. See CONTRIBUTING.md for the full guide.


Made in Amsterdam, Netherlands 🇳🇱

MIT License