Skip to content

Commit 700a742

Browse files
authored
Merge pull request #3 from ym-pett/add_listrule
added type rule
2 parents 3ef965e + 9452267 commit 700a742

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/CheatFinder.scala

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,34 @@ object Rule:
5050
"https://docs.scala-lang.org/overviews/collections-2.13/strings.html#inner-main",
5151
_.collect { case aString: Lit.String =>
5252
aString.toString
53-
}
53+
}
54+
)
55+
56+
lazy val typeRule = Rule(
57+
"A Type",
58+
"https://docs.scala-lang.org/scala3/book/types-introduction.html",
59+
_.collect { case aType: Type.Name =>
60+
aType.toString()
61+
}
62+
)
63+
64+
val typeList: List[(String, String)] = List(
65+
(
66+
"Int",
67+
"https://docs.scala-lang.org/scala3/book/scala-for-javascript-devs.html#numbers-and-arithmetic"
68+
),
69+
(
70+
"List",
71+
"https://docs.scala-lang.org/scala3/book/collections-classes.html#list"
72+
)
5473
)
5574

5675
lazy val rules = List(
5776
objectRule,
5877
classRule,
5978
typeParameterRule,
60-
stringRule
79+
stringRule,
80+
typeRule
6181
)
6282

6383
end Rule

0 commit comments

Comments
 (0)