Skip to content

Commit 38ee45d

Browse files
committed
Removed most long lines
1 parent 24468b8 commit 38ee45d

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/core/digression.Digression.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ object Digression:
3434

3535
val javaKeywords: Set[String] =
3636
Set
37-
("abstract", "continue", "for", "new", "switch", "assert", "default", "if", "package", "synchronized",
38-
"boolean", "do", "goto", "private", "this", "break", "double", "implements", "protected", "throw",
39-
"byte", "else", "import", "public", "throws", "case", "enum", "instanceof", "return", "transient",
40-
"catch", "extends", "int", "short", "try", "char", "final", "interface", "static", "void", "class",
41-
"finally", "long", "strictfp", "volatile", "const", "float", "native", "super", "while")
37+
("abstract", "continue", "for", "new", "switch", "assert", "default", "if", "package",
38+
"synchronized", "boolean", "do", "goto", "private", "this", "break", "double", "implements",
39+
"protected", "throw", "byte", "else", "import", "public", "throws", "case", "enum",
40+
"final", "interface", "static", "void", "class", "finally", "long", "strictfp", "volatile",
41+
"const", "float", "native", "super", "while")
4242

4343
def fqcn(context: Expr[StringContext])(using Quotes): Expr[Fqcn] =
4444
haltingly('{new Fqcn(${Expr(Fqcn(context.valueOrAbort.parts.head.tt).parts)})})

src/core/digression.Fqcn.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ import language.experimental.captureChecking
2525

2626
object Fqcn:
2727
def valid(char: Char): Boolean =
28-
char >= 'A' && char <= 'Z' || char >= 'a' && char <= 'z' || char >= '0' && char <= '9' || char == '_'
28+
char >= 'A' && char <= 'Z' || char >= 'a' && char <= 'z' || char >= '0' && char <= '9'
29+
|| char == '_'
2930

3031
def apply(name: Text): Fqcn raises FqcnError =
3132
val parts = IArray.from(name.s.split("\\.").nn.map(_.nn))
3233

3334
parts.foreach: part =>
3435
if part.length == 0 then raise(FqcnError(name, FqcnError.Reason.EmptyName), ())
35-
if Digression.javaKeywords.has(part) then raise(FqcnError(name, FqcnError.Reason.JavaKeyword(part.tt)), ())
36+
if Digression.javaKeywords.has(part)
37+
then raise(FqcnError(name, FqcnError.Reason.JavaKeyword(part.tt)), ())
3638

3739
part.foreach: char =>
3840
if !valid(char) then raise(FqcnError(name, FqcnError.Reason.InvalidChar(char)), ())

src/core/digression.StackTrace.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ case class StackTrace
222222
cause: Optional[StackTrace]):
223223

224224
def crop(cutClassName: Text, cutMethod: Text): StackTrace =
225-
val frames2 = frames.takeWhile { f => f.method.className != cutClassName || f.method.method != cutMethod }
225+
val frames2 = frames.takeWhile: f =>
226+
f.method.className != cutClassName || f.method.method != cutMethod
227+
226228
StackTrace(component, className, message, frames2, cause)
227229

228230
def drop(n: Int): StackTrace =

0 commit comments

Comments
 (0)