Rewrites

dotty.tools.dotc.rewrites.Rewrites
See theRewrites companion class
object Rewrites

Handles rewriting of Scala2 files to Dotty

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Rewrites.type

Members list

Value members

Concrete methods

def overlapsPatch(source: SourceFile, span: Span)(using Context): Boolean

Does span overlap with a patch region of source?

Does span overlap with a patch region of source?

Attributes

def patch(source: SourceFile, span: Span, replacement: String)(using Context): Unit

If -rewrite is set, record a patch that replaces the range given by span in source by replacement

If -rewrite is set, record a patch that replaces the range given by span in source by replacement

Attributes

def patch(span: Span, replacement: String)(using Context): Unit

Patch position in ctx.compilationUnit.source.

Patch position in ctx.compilationUnit.source.

Attributes

def writeBack()(using Context): Unit

If -rewrite is set, apply all patches and overwrite patched source files.

If -rewrite is set, apply all patches and overwrite patched source files.

Attributes