diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-11-20 00:02:50 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-11-22 01:35:08 +0100 |
commit | c3eb841ce8ae349d9820dbf6c18884955e74254e (patch) | |
tree | 5e82e22a6f0e8245c11a6db81cb9647106a14bde /interfaces/src/main | |
parent | da1bfe392c638fc03181e0d6b51eb41dbdcce548 (diff) | |
download | dotty-c3eb841ce8ae349d9820dbf6c18884955e74254e.tar.gz dotty-c3eb841ce8ae349d9820dbf6c18884955e74254e.tar.bz2 dotty-c3eb841ce8ae349d9820dbf6c18884955e74254e.zip |
Make every project use the new directory structure
Diffstat (limited to 'interfaces/src/main')
7 files changed, 0 insertions, 167 deletions
diff --git a/interfaces/src/main/java/dotty/tools/dotc/interfaces/AbstractFile.java b/interfaces/src/main/java/dotty/tools/dotc/interfaces/AbstractFile.java deleted file mode 100644 index 286e7b2cf..000000000 --- a/interfaces/src/main/java/dotty/tools/dotc/interfaces/AbstractFile.java +++ /dev/null @@ -1,24 +0,0 @@ -package dotty.tools.dotc.interfaces; - -import java.io.File; -import java.util.Optional; - -/** An abstract file may either be a file on disk or a virtual file. - * - * Do not rely on the identity of instances of this class. - * - * User code should not implement this interface, but it may have to - * manipulate objects of this type. - */ -public interface AbstractFile { - /** @return The name of this file, note that two files may have the same name. */ - String name(); - - /** @return The path of this file, this might be a virtual path of an unspecified format. */ - String path(); - - /** @return If this is a real file on disk, a `java.io.File` that corresponds to this file. - * Otherwise, an empty `Optional`. - */ - Optional<File> jfile(); -} diff --git a/interfaces/src/main/java/dotty/tools/dotc/interfaces/CompilerCallback.java b/interfaces/src/main/java/dotty/tools/dotc/interfaces/CompilerCallback.java deleted file mode 100644 index 25696f740..000000000 --- a/interfaces/src/main/java/dotty/tools/dotc/interfaces/CompilerCallback.java +++ /dev/null @@ -1,28 +0,0 @@ -package dotty.tools.dotc.interfaces; - -/** Set of callbacks called in response to events during the compilation process. - * - * You should implement this interface if you want to react to one or more of - * these events. - * - * See the method `process` of `dotty.tools.dotc.Driver` for more information. - */ -public interface CompilerCallback { - /** Called when a class has been generated. - * - * @param source The source file corresponding to this class. - * Example: ./src/library/scala/collection/Seq.scala - * @param generatedClass The generated classfile for this class. - * Example: ./scala/collection/Seq$.class - * @param className The name of this class. - * Example: scala.collection.Seq$ - */ - default void onClassGenerated(SourceFile source, AbstractFile generatedClass, String className) {}; - - /** Called when every class for this file has been generated. - * - * @param source The source file. - * Example: ./src/library/scala/collection/Seq.scala - */ - default void onSourceCompiled(SourceFile source) {}; -} diff --git a/interfaces/src/main/java/dotty/tools/dotc/interfaces/Diagnostic.java b/interfaces/src/main/java/dotty/tools/dotc/interfaces/Diagnostic.java deleted file mode 100644 index c46360afa..000000000 --- a/interfaces/src/main/java/dotty/tools/dotc/interfaces/Diagnostic.java +++ /dev/null @@ -1,26 +0,0 @@ -package dotty.tools.dotc.interfaces; - -import java.util.Optional; - -/** A diagnostic is a message emitted during the compilation process. - * - * It can either be an error, a warning or an information. - * - * User code should not implement this interface, but it may have to - * manipulate objects of this type. - */ -public interface Diagnostic { - public static final int ERROR = 2; - public static final int WARNING = 1; - public static final int INFO = 0; - - /** @return The message to report */ - String message(); - - /** @return Level of the diagnostic, can be either ERROR, WARNING or INFO */ - int level(); - - /** @return The position in a source file of the code that caused this diagnostic - * to be emitted. */ - Optional<SourcePosition> position(); -} diff --git a/interfaces/src/main/java/dotty/tools/dotc/interfaces/ReporterResult.java b/interfaces/src/main/java/dotty/tools/dotc/interfaces/ReporterResult.java deleted file mode 100644 index f75519db2..000000000 --- a/interfaces/src/main/java/dotty/tools/dotc/interfaces/ReporterResult.java +++ /dev/null @@ -1,18 +0,0 @@ -package dotty.tools.dotc.interfaces; - -/** Summary of the diagnostics emitted by a Reporter. - * - * User code should not implement this interface, but it may have to - * manipulate objects of this type. - */ -public interface ReporterResult { - /** @return Have we emitted any error? */ - boolean hasErrors(); - /** @return Number of errors that have been emitted */ - int errorCount(); - - /** @return Have we emitted any warning ? */ - boolean hasWarnings(); - /** @return Number of warnings that have been emitted */ - int warningCount(); -} diff --git a/interfaces/src/main/java/dotty/tools/dotc/interfaces/SimpleReporter.java b/interfaces/src/main/java/dotty/tools/dotc/interfaces/SimpleReporter.java deleted file mode 100644 index f4c80c0cf..000000000 --- a/interfaces/src/main/java/dotty/tools/dotc/interfaces/SimpleReporter.java +++ /dev/null @@ -1,15 +0,0 @@ -package dotty.tools.dotc.interfaces; - -/** Report errors, warnings and info messages during the compilation process - * - * You should implement this interface if you want to handle the diagnostics - * returned by the compiler yourself. - * - * See the method `process` of `dotty.tools.dotc.Driver` for more information. - */ -public interface SimpleReporter { - /** Report a diagnostic. - * @param diag the diagnostic message to report - */ - void report(Diagnostic diag); -} diff --git a/interfaces/src/main/java/dotty/tools/dotc/interfaces/SourceFile.java b/interfaces/src/main/java/dotty/tools/dotc/interfaces/SourceFile.java deleted file mode 100644 index 6c72a5125..000000000 --- a/interfaces/src/main/java/dotty/tools/dotc/interfaces/SourceFile.java +++ /dev/null @@ -1,11 +0,0 @@ -package dotty.tools.dotc.interfaces; - -/** A source file. - * - * User code should not implement this interface, but it may have to - * manipulate objects of this type. - */ -public interface SourceFile extends AbstractFile { - /** @return The content of this file as seen by the compiler. */ - char[] content(); -} diff --git a/interfaces/src/main/java/dotty/tools/dotc/interfaces/SourcePosition.java b/interfaces/src/main/java/dotty/tools/dotc/interfaces/SourcePosition.java deleted file mode 100644 index d8afbf5f6..000000000 --- a/interfaces/src/main/java/dotty/tools/dotc/interfaces/SourcePosition.java +++ /dev/null @@ -1,45 +0,0 @@ -package dotty.tools.dotc.interfaces; - -/** A position in a source file. - * - * A position is a range between a start offset and an end offset, as well as a - * point inside this range. - * - * As a convenience, we also provide methods that return the line and the column - * corresponding to each offset. - * - * User code should not implement this interface, but it may have to - * manipulate objects of this type. - */ -public interface SourcePosition { - /** @return Content of the line which contains the point */ - String lineContent(); - - /** @return Offset to the point */ - int point(); - /** @return Line number of the point, starting at 0 */ - int line(); - /** @return Column number of the point, starting at 0 */ - int column(); - - /** @return Offset to the range start */ - int start(); - /** @return Line number of the range start, starting at 0 */ - int startLine(); - /** @return Column number of the range start, starting at 0 */ - int startColumn(); - - /** @return Offset to the range end */ - int end(); - /** @return Line number of the range end, starting at 0 */ - int endLine(); - /** @return Column number of the range end, starting at 0 */ - int endColumn(); - - /** The source file corresponding to this position. - * The values returned by `point()`, `start()` and `end()` - * are indices in the array returned by `source().content()`. - * @return source file for this position - */ - SourceFile source(); -} |