Skip to content

Support new Scala3 modifiers #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion generator/src/main/protobuf/scalameta.proto
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ message SymbolInformation {
PRIMARY = 0x2000;
ENUM = 0x4000;
DEFAULT = 0x8000;
GIVEN = 0x10000;
INLINE = 0x20000;
OPEN = 0x40000;
TRANSPARENT = 0x80000;
INFIX = 0x100000;
OPAQUE = 0x200000;
}
reserved 2, 6, 7, 8, 9, 10, 11, 12, 14, 15;
string symbol = 1;
Expand Down Expand Up @@ -414,4 +420,4 @@ message SelectTree {
message TypeApplyTree {
Tree function = 1;
repeated Type type_arguments = 2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool
def isPrimary: _root_.scala.Boolean = false
def isEnum: _root_.scala.Boolean = false
def isDefault: _root_.scala.Boolean = false
def isGiven: _root_.scala.Boolean = false
def isInline: _root_.scala.Boolean = false
def isOpen: _root_.scala.Boolean = false
def isTransparent: _root_.scala.Boolean = false
def isInfix: _root_.scala.Boolean = false
def isOpaque: _root_.scala.Boolean = false

final def asRecognized: _root_.scala.Option[dotty.tools.dotc.semanticdb.SymbolInformation.Property.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[dotty.tools.dotc.semanticdb.SymbolInformation.Property.Recognized])
}
Expand Down Expand Up @@ -549,10 +555,52 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool
override def isDefault: _root_.scala.Boolean = true
}

@SerialVersionUID(0L)
case object GIVEN extends Property(65536) with Property.Recognized {
val index = 15
val name = "GIVEN"
override def isGiven: _root_.scala.Boolean = true
}

@SerialVersionUID(0L)
case object INLINE extends Property(131072) with Property.Recognized {
val index = 16
val name = "INLINE"
override def isInline: _root_.scala.Boolean = true
}

@SerialVersionUID(0L)
case object OPEN extends Property(262144) with Property.Recognized {
val index = 17
val name = "OPEN"
override def isOpen: _root_.scala.Boolean = true
}

@SerialVersionUID(0L)
case object TRANSPARENT extends Property(524288) with Property.Recognized {
val index = 18
val name = "TRANSPARENT"
override def isTransparent: _root_.scala.Boolean = true
}

@SerialVersionUID(0L)
case object INFIX extends Property(1048576) with Property.Recognized {
val index = 19
val name = "INFIX"
override def isInfix: _root_.scala.Boolean = true
}

@SerialVersionUID(0L)
case object OPAQUE extends Property(2097152) with Property.Recognized {
val index = 20
val name = "OPAQUE"
override def isOpaque: _root_.scala.Boolean = true
}

@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Property(unrecognizedValue) with SemanticdbUnrecognizedEnum

lazy val values = scala.collection.immutable.Seq(UNKNOWN_PROPERTY, ABSTRACT, FINAL, SEALED, IMPLICIT, LAZY, CASE, COVARIANT, CONTRAVARIANT, VAL, VAR, STATIC, PRIMARY, ENUM, DEFAULT)
lazy val values = scala.collection.immutable.Seq(UNKNOWN_PROPERTY, ABSTRACT, FINAL, SEALED, IMPLICIT, LAZY, CASE, COVARIANT, CONTRAVARIANT, VAL, VAR, STATIC, PRIMARY, ENUM, DEFAULT, GIVEN, INLINE, OPEN, TRANSPARENT, INFIX, OPAQUE)
def fromValue(__value: _root_.scala.Int): Property = __value match {
case 0 => UNKNOWN_PROPERTY
case 4 => ABSTRACT
Expand All @@ -569,6 +617,12 @@ object SymbolInformation extends SemanticdbGeneratedMessageCompanion[dotty.tool
case 8192 => PRIMARY
case 16384 => ENUM
case 32768 => DEFAULT
case 65536 => GIVEN
case 131072 => INLINE
case 262144 => OPEN
case 524288 => TRANSPARENT
case 1048576 => INFIX
case 2097152 => OPAQUE
case __other => Unrecognized(__other)
}

Expand Down