diff options
author | Ondrej Lhotak <olhotak@uwaterloo.ca> | 2014-09-04 17:06:02 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-11-22 20:10:20 +0100 |
commit | 03627e71d9fdc4b2211d244cc8fd844d57997357 (patch) | |
tree | b0062570c12f5713c09d0aa2519819c202c1f8cb /src/dotty/tools/dotc/core/Flags.scala | |
parent | cc1d36f64d324b972ec3116f93c4f62fafd706bc (diff) | |
download | dotty-03627e71d9fdc4b2211d244cc8fd844d57997357.tar.gz dotty-03627e71d9fdc4b2211d244cc8fd844d57997357.tar.bz2 dotty-03627e71d9fdc4b2211d244cc8fd844d57997357.zip |
Initial implementation of Java scanner and parser
Ported from scalac 2.11.x branch SHA 9753f23f9362b25a9f481b11dd8d51187187882a
This is mostly a direct port, with few significant dotty-specific
changes needed. The two more significant changes are:
In dotty, the first constructor of a class is pulled out separately from
the other stats in the Template.
The keyword detection code (buildKeywordArray) was moved into Tokens so
that it can more cleanly be shared by the Scala and Java scanners.
Diffstat (limited to 'src/dotty/tools/dotc/core/Flags.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Flags.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala index c966f0d61..0e86a2936 100644 --- a/src/dotty/tools/dotc/core/Flags.scala +++ b/src/dotty/tools/dotc/core/Flags.scala @@ -356,6 +356,12 @@ object Flags { /** Symbol is a Java-style varargs method */ final val JavaVarargs = termFlag(37, "<varargs>") + /** Symbol is a Java default method */ + final val DefaultMethod = termFlag(38, "<defaultmethod>") + + /** Symbol is a Java enum */ + final val Enum = commonFlag(40, "<enum>") + // Flags following this one are not pickled /** Symbol always defines a fresh named type */ @@ -547,6 +553,9 @@ object Flags { /** A Java interface, potentially with default methods */ final val JavaTrait = allOf(JavaDefined, Trait, NoInits) + + /** A Java interface */ + final val JavaInterface = allOf(JavaDefined, Trait) /** A Java companion object */ final val JavaModule = allOf(JavaDefined, Module) |