Skip to content
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
14 changes: 10 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
val commonSettings = Seq(
version := "0.6.1",
scalaVersion := "3.5.2",
crossScalaVersions := Seq("3.5.2"),
scalaVersion := "3.7.2",
crossScalaVersions := Seq("3.7.2"),
organization := "ch.epfl.lara",
// resolvers += "bintray-epfl-lara" at "https://dl.bintray.com/epfl-lara/maven",
)
Expand All @@ -22,7 +22,13 @@ lazy val scallion = project
"-unchecked"
),

Compile / doc / scalacOptions ++= Seq(
ThisBuild / scalacOptions ++= Seq(
"-source:3.7-migration", // enable migration mode
"-rewrite" // apply rewrites automatically
),


Compile / doc / scalacOptions ++= Seq(
"-groups",
"-sourcepath", baseDirectory.value.getAbsolutePath,
"-doc-root-content", baseDirectory.value + "/project/root-doc.txt"
Expand All @@ -31,7 +37,7 @@ lazy val scallion = project
Compile / doc / target := baseDirectory.value / "docs",

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
),

bintrayOrganization := Some("epfl-lara"),
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/scallion/Debug.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import scala.io.AnsiColor._
*
* @group debug
*/
trait Debug { self: Syntaxes with Parsing with Enumeration =>
trait Debug { self: Syntaxes & Parsing & Enumeration =>

import Conflict._

Expand Down Expand Up @@ -68,7 +68,7 @@ trait Debug { self: Syntaxes with Parsing with Enumeration =>

import scala.language.existentials

val (root, kinds): (Syntax[_], Set[Kind]) = conflict match {
val (root, kinds): (Syntax[?], Set[Kind]) = (conflict match {
case NullableConflict(source) => {
builder ++= s"${m(BOLD)}Nullable/Nullable conflict.${m(RESET)}\n\n"
builder ++= "Both branches of a disjunction are nullable.\n"
Expand Down Expand Up @@ -98,7 +98,7 @@ trait Debug { self: Syntaxes with Parsing with Enumeration =>
builder ++= s"${kinds.mkString(", ")}.\n"
(root, kinds)
}
}
}): @unchecked
builder ++= "\n"

builder ++= "The source of the conflict can be traced to:\n\n"
Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/scallion/Enumeration.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import scallion.util.internal.enums._
*
* @group enumeration
*/
trait Enumeration { self: Syntaxes with Parsing =>
trait Enumeration { self: Syntaxes & Parsing =>

/** Factory of iterators over sequences accepted by a syntax.
*
Expand All @@ -40,13 +40,13 @@ trait Enumeration { self: Syntaxes with Parsing =>
*
* @group enumeration
*/
def apply[A](syntax: Syntax[_], kindFunction: Kind => A)
def apply[A](syntax: Syntax[?], kindFunction: Kind => A)
(markFunction: PartialFunction[Mark, A]): Iterator[Iterator[A]] = {
var recs: Map[Int, EnvEntry[A]] = Map()
val probe: Probe = new Probe
val markLifted: Mark => Option[A] = markFunction.lift

def go(syntax: Syntax[_], subscriber: Tree[A] => Unit): Cell = {
def go(syntax: Syntax[?], subscriber: Tree[A] => Unit): Cell = {
if (!syntax.isProductive) {
EmptyCell
}
Expand Down Expand Up @@ -118,7 +118,7 @@ trait Enumeration { self: Syntaxes with Parsing =>
*
* @group enumeration
*/
def apply(syntax: Syntax[_]): Iterator[Iterator[Kind]] = {
def apply(syntax: Syntax[?]): Iterator[Iterator[Kind]] = {
apply(syntax, (kind: Kind) => kind)(PartialFunction.empty[Mark, Kind])
}
}
Expand Down
Loading