-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from adpi2/rework-migrate-types
Rework migrate types
- Loading branch information
Showing
39 changed files
with
284 additions
and
238 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
interfaces/compiler/src/main/java/migrate/compiler/interfaces/CompilationUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package migrate.compiler.interfaces; | ||
|
||
import java.nio.file.Path; | ||
|
||
public class CompilationUnit { | ||
public String content; | ||
public String name; | ||
public Path path; | ||
|
||
public CompilationUnit(String name, String content, Path path) { | ||
this.name = name; | ||
this.content = content; | ||
this.path = path; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ate/interfaces/FileWithErrorReporter.java → ...ler/interfaces/FileWithErrorReporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...a/migrate/interfaces/MigrateReporter.java → .../compiler/interfaces/MigrateReporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
interfaces/compiler/src/main/java/migrate/compiler/interfaces/MigrationFile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package migrate.compiler.interfaces; | ||
|
||
import dotty.tools.io.VirtualFile; | ||
import java.nio.file.Path; | ||
|
||
class MigrationFile extends VirtualFile { | ||
private Path _jpath; | ||
|
||
public MigrationFile(String name, Path path) { | ||
super(name, path.toString()); | ||
this._jpath = path; | ||
} | ||
|
||
@Override | ||
public Path jpath() { | ||
return _jpath; | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
interfaces/compiler/src/main/java/migrate/compiler/interfaces/MigrationSourceFile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package migrate.compiler.interfaces; | ||
|
||
import dotty.tools.dotc.util.SourceFile; | ||
import java.nio.file.Path; | ||
|
||
class MigrationSourceFile extends SourceFile { | ||
private char[] _content; | ||
|
||
public MigrationSourceFile(String content, String name, Path path) { | ||
super(new MigrationFile(name, path), null); | ||
this._content = content.toCharArray(); | ||
} | ||
|
||
@Override | ||
public char[] content() { | ||
return _content; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ava/migrate/interfaces/QuietReporter.java → ...te/compiler/interfaces/QuietReporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/migrate/interfaces/Scala3Driver.java → ...ate/compiler/interfaces/Scala3Driver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
interfaces/compiler/src/main/java/migrate/interfaces/CompilationUnit.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.