Skip to content

Commit

Permalink
Shorten token and ModExt descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Nov 23, 2024
1 parent 7e2bb4e commit 7759d35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ case class ModExt(
@inline
def res(suffix: String) = {
val ind = if (indents.isEmpty) "" else indents.mkString("[", ", ", "]")
s"$prefix$mod($indentPrefix$ind)$suffix"
s"$prefix$mod$indentPrefix$ind$suffix"
}

altOpt match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ object LoggerOps {
def tokWithoutPos(token: T): String = {
val desc = token.structure
val posidx = desc.lastIndexOf('[')
if (posidx > 0) desc.substring(0, posidx - 1) else desc
val len = if (posidx > 0) posidx - 1 else desc.length
val txtidx = desc.indexOf('(')
if (txtidx < 0 || len <= txtidx + 52) desc.substring(0, len)
else desc.substring(0, txtidx + 50) + "...)"
}

def log(range: InputRange): String = s"[${range.start}..${range.end})"
Expand Down

0 comments on commit 7759d35

Please sign in to comment.