Skip to content

Commit

Permalink
using
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Oct 22, 2024
1 parent 33d3207 commit bd1c7ce
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion cli/jvm/src/main/scala/chester/repl/JLineTerminal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class JLineTerminal(init: TerminalInit) {

status match {
case InputStatus.Complete =>
(0 until history.size()).map(history.get(_).toString)
result = LineRead(line)
continue = false
case InputStatus.Incomplete =>
Expand Down
3 changes: 2 additions & 1 deletion cli/shared/src/main/scala/chester/cli/CLI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class CLI[F[_]](using

val source = FilePath(inputFile)

implicit object reporter extends Reporter[Problem] {
object reporter extends Reporter[Problem] {
private var varErrors: Boolean = false

override def apply(problem: Problem): Unit = problem.severity match {
Expand All @@ -153,6 +153,7 @@ class CLI[F[_]](using

def hasErrors: Boolean = varErrors
}
given reportG: reporter.type = reporter

for {
// Load TASTs from the specified directories
Expand Down
2 changes: 1 addition & 1 deletion parser/src/main/scala/chester/parser/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ case class ParserInternal(
sourceOffset: SourceOffset,
ignoreLocation: Boolean = false,
defaultIndexer: Option[StringIndex] = None
)(implicit p: P[?]) {
)(using p: P[?]) {
val fileName = sourceOffset.fileName
val linesOffset = sourceOffset.linesOffset
val posOffset = sourceOffset.posOffset
Expand Down
2 changes: 1 addition & 1 deletion parser/src/main/scala/chester/parser/Parser/pkg.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private def parseFromSource[T](
SourceOffset(source),
ignoreLocation = ignoreLocation,
defaultIndexer = Some(indexer)
)(x)
)(using x)
)
) match {
case Parsed.Success(result, _) => Right(result)
Expand Down
2 changes: 1 addition & 1 deletion parser/src/main/scala/chester/parser/ParserEngine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ object ParserEngine {
linesOffset = linesOffset,
posOffset = posOffset
)
)(p).exprEntrance
)(using p).exprEntrance
) match {
case Parsed.Success(expr, _) => Right(expr)
case f: Parsed.Failure => Left(ParseError(f.msg, Pos.Zero))
Expand Down

0 comments on commit bd1c7ce

Please sign in to comment.