Dotty Documentation

0.15.0-bin-SNAPSHOT

object Rewrites
extends Object with Serializable

Handles rewriting of Scala2 files to Dotty

[-] Constructors

[-] Members

[+] private case class Patch
[+] private object Patch
[+] private class PatchedFiles
[+] private class Patches
[+] def patch ( source: SourceFile , span: Span , replacement: String ) ( implicit ctx: Context ) : Unit

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

[+] def patch ( span: Span , replacement: String ) ( implicit ctx: Context ) : Unit

Patch position in ctx.compilationUnit.source.

[+] def writeBack ( ) ( implicit ctx: Context ) : Unit

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