Skip to main content

Scala extractor

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:
Running differens old.scala new.scala:

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.