diff options
author | Maxime Kjaer <maxime.kjaer@gmail.com> | 2021-03-01 11:39:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 11:39:20 +0100 |
commit | 37113b095ee9a445187a8478589010347b7a9687 (patch) | |
tree | 29538f8314345a1a4bcb62406dd58b336107f0a2 /tests/examplefiles/scala/end.scala | |
parent | c1a0d82acbe6fa026a1f6843fee00cc1df626549 (diff) | |
download | pygments-git-37113b095ee9a445187a8478589010347b7a9687.tar.gz |
Rewrite Scala lexer for Scala 3 (#1694)
Diffstat (limited to 'tests/examplefiles/scala/end.scala')
-rw-r--r-- | tests/examplefiles/scala/end.scala | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/examplefiles/scala/end.scala b/tests/examplefiles/scala/end.scala new file mode 100644 index 00000000..b09bf2dc --- /dev/null +++ b/tests/examplefiles/scala/end.scala @@ -0,0 +1,52 @@ +new Foo: + // ... +end new +end extension +end if +end while +end for +end match +class Foo +end Foo +end bar +end `bar` +end // test comment +package p1.p2: + abstract class C(): + def this(x: Int) = + this() + if x > 0 then + val a :: b = + x :: Nil + end val // test comment + var y = + x + end y // test comment + while y > 0 do + println(y) + y -= 1 + end while // test comment + try + x match + case 0 => println("0") + case _ => + end match // test comment + finally + println("done") + end try // test comment + end if // test comment + end this // test comment + def f: String + end C // test comment + object C: + given C = + new C: + def f = "!" + end f // test comment + end new // test comment + end given // test comment + end C // test comment + extension (x: C) + def ff: String = x.f ++ x.f + end extension // test comment +end p2 // test comment
\ No newline at end of file |