Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.33 KB | None | 0 0
  1. abstract class A {
  2.   def parseCharRef(ch: () => Char, nextch: () => Unit, reportSyntaxError: String => Unit): String = {
  3.     while (ch() != ';') {
  4.       ch() match {
  5.         case 'a' | 'b' =>
  6.           reportSyntaxError("plop")
  7.         case _ =>
  8.           reportSyntaxError("plip")
  9.       }
  10.       nextch()
  11.     }
  12.     "plop"
  13.   }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement