From 03627e71d9fdc4b2211d244cc8fd844d57997357 Mon Sep 17 00:00:00 2001 From: Ondrej Lhotak Date: Thu, 4 Sep 2014 17:06:02 +0200 Subject: 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. --- src/dotty/tools/dotc/core/Flags.scala | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/dotty/tools/dotc/core/Flags.scala') 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, "") + /** Symbol is a Java default method */ + final val DefaultMethod = termFlag(38, "") + + /** Symbol is a Java enum */ + final val Enum = commonFlag(40, "") + // 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) -- cgit v1.2.3