Skip to main content

C extractor

The C extractor maps tree-sitter C CST nodes to canonical concepts. C has no name fields in its grammar, so every declaration name is recovered through the declarator chain: function_definition → function_declarator → identifier.

Detected concepts

Example

Renaming a function:
Running differens old.c new.c:

Known limitations

  • Preprocessor macros are tokens, not structure: a macro that generates code does not expand before diffing.
  • Function prototypes and definitions are matched structurally; a prototype moving between headers reports as a move, not a signature change.