Skip to main content
The Scala extractor maps tree-sitter Scala CST nodes to canonical concepts. Class, object, and definition names come from the standard name field; val and var names come from the pattern field.

Detected concepts

Example

Renaming a method:
old.scala
new.scala
Running differens old.scala new.scala:

Example: change the body

Keep the declaration name and change what it does:
The report groups the value edit under its containing declaration. Use --format=json to inspect the underlying action and context, or --format=llm for a compact report with source locations.

Known limitations

  • Implicits and given clauses are structure: adding one reports as an insert on the declaration.
  • var definitions in some template contexts produce an ERROR node in the grammar; they parse cleanly in class and object bodies.