diff options
author | Paul Phillips <paulp@improving.org> | 2011-01-04 23:40:28 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-01-04 23:40:28 +0000 |
commit | b2fbd5a79f687312ae32fe117e49e171fea01993 (patch) | |
tree | 37f5320efc5ec9f8692eeb2222c2ddddd999bf3b /test/files/run/lisp.scala | |
parent | 8ae754399d250a8f5bc66e8347949e5c5570ac34 (diff) | |
download | scala-b2fbd5a79f687312ae32fe117e49e171fea01993.tar.gz scala-b2fbd5a79f687312ae32fe117e49e171fea01993.tar.bz2 scala-b2fbd5a79f687312ae32fe117e49e171fea01993.zip |
Eliminated 16 avoidable closure objects in Stream.
Diffstat (limited to 'test/files/run/lisp.scala')
-rw-r--r-- | test/files/run/lisp.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/files/run/lisp.scala b/test/files/run/lisp.scala index fe3941d0db..3436594def 100644 --- a/test/files/run/lisp.scala +++ b/test/files/run/lisp.scala @@ -20,7 +20,7 @@ class LispTokenizer(s: String) extends Iterator[String] { do i = i + 1 while (!isDelimiter(s charAt i)) s.substring(start, i) - } else error("premature end of string") + } else system.error("premature end of string") } //############################################################################ @@ -102,7 +102,7 @@ object LispCaseClasses extends Lisp { var indent: Int = 0 def lispError[a](msg: String): a = - error("error: " + msg + "\n" + curexp); + system.error("error: " + msg + "\n" + curexp); trait Environment { def lookup(n: String): Data; @@ -201,7 +201,7 @@ object LispCaseClasses extends Lisp { val ps: List[String] = toList(params) map { case SYM(name) => name - case _ => error("illegal parameter list"); + case _ => system.error("illegal parameter list"); } FUN(args => eval(expr, extendEnv(env, ps, args))) @@ -237,7 +237,7 @@ object LispCaseClasses extends Lisp { val it = new LispTokenizer(s); def parseExpr(token: String): Data = { if (token == "(") parseList - else if (token == ")") error("unbalanced parentheses") + else if (token == ")") system.error("unbalanced parentheses") else if ('0' <= token.charAt(0) && token.charAt(0) <= '9') NUM(token.toInt) else if (token.charAt(0) == '\"' && token.charAt(token.length()-1)=='\"') @@ -270,7 +270,7 @@ object LispAny extends Lisp { var indent: Int = 0; def lispError[a](msg: String): a = - error("error: " + msg + "\n" + curexp); + system.error("error: " + msg + "\n" + curexp); trait Environment { def lookup(n: String): Data; @@ -392,7 +392,7 @@ object LispAny extends Lisp { val ps: List[String] = asList(params) map { case Symbol(name) => name - case _ => error("illegal parameter list"); + case _ => system.error("illegal parameter list"); } Lambda(args => eval(expr, extendEnv(env, ps, args))) @@ -428,7 +428,7 @@ object LispAny extends Lisp { val it = new LispTokenizer(s); def parseExpr(token: String): Data = { if (token == "(") parseList - else if (token == ")") error("unbalanced parentheses") + else if (token == ")") system.error("unbalanced parentheses") //else if (Character.isDigit(token.charAt(0))) else if (token.charAt(0).isDigit) token.toInt |