From 257a1845d3db3477a0b5939e94d77b0495d89561 Mon Sep 17 00:00:00 2001 From: mihaylov Date: Wed, 1 Nov 2006 16:03:28 +0000 Subject: Refactored portability support --- test/files/run/lisp.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/files/run/lisp.scala') diff --git a/test/files/run/lisp.scala b/test/files/run/lisp.scala index bf895f2349..8a559bc813 100644 --- a/test/files/run/lisp.scala +++ b/test/files/run/lisp.scala @@ -240,7 +240,7 @@ object LispCaseClasses extends Lisp { if (token == "(") parseList else if (token == ")") error("unbalanced parentheses") else if ('0' <= token.charAt(0) && token.charAt(0) <= '9') - NUM(compat.Platform.parseInt(token)) + NUM(token.toInt) else if (token.charAt(0) == '\"' && token.charAt(token.length()-1)=='\"') STR(token.substring(1,token.length() - 1)) else SYM(token) @@ -432,8 +432,8 @@ object LispAny extends Lisp { if (token == "(") parseList else if (token == ")") error("unbalanced parentheses") //else if (Character.isDigit(token.charAt(0))) - else if (compat.Platform.isDigit(token.charAt(0))) - compat.Platform.parseInt(token) + else if (token.charAt(0).isDigit) + token.toInt else if (token.charAt(0) == '\"' && token.charAt(token.length()-1)=='\"') token.substring(1,token.length() - 1) else Symbol(token) @@ -457,7 +457,7 @@ class LispUser(lisp: Lisp) { def run = { - Console.println(string2lisp("(lambda (x) (+ (* x x) 1))").asInstanceOf[Object]); + Console.println(string2lisp("(lambda (x) (+ (* x x) 1))").asInstanceOf[AnyRef]); Console.println(lisp2string(string2lisp("(lambda (x) (+ (* x x) 1))"))); Console.println; -- cgit v1.2.3