-
Notifications
You must be signed in to change notification settings - Fork 728
/
scala
71 lines (51 loc) · 1.23 KB
/
scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package whatever.mine
import foo.bar.{Foo, Bar => Baz}
/* This file /* which is totally legal scala */ should be highlighted
correcty by rouge */
// Single-line comments too
object ⌘ {
val `interface` = """
A
"Multiline"
String
"""
val s = 'symbol
@tailrec
val foo_+ = "foo plus"
val foo_⌬⌬ = "double benzene"
def main(argv: Array[String]) {
println(⌘.interface + " " + foo_+ + " " + foo_⌬⌬ )
}
def noWhitespaceType[Foo](arg:ClassName[Foo])(implicit evidence: Foo =:= Int) {}
val char = 'a'
var unicodeChar = '\uAB23'
val constant = true
import more.stuff._
def methodChaining(s: String): String = {
val n = s.length.toInt
s.foreach(print)
s
.take(n)
.toLowerCase
}
}
abstract case class Foo[+A, B <: List[A]](a: A) {
type Bar = Baz
def apply[C >: A](c: Foo[C]): Foo[C]
}
class // comment 1
Test(a: // comment 2
Int) {
}
class why_would_you_name_a_class_this_way_oh_well_we_need_to_highlight_it(a: Int) extends Foo(a) {
def this(b: Float) = this(b.toInt)
def ints = 4
def floats = 4f
def doubles = 0.4
def longs = 4L
def hex = 0x123
}
StorageState.table(StorageState.NewUsers()).format(
keyParams('app_id).asInstanceOf[String]
)
// Comment at EOF