Mercurial Hosting > luan
diff src/luan/interp/LuaParser.java @ 46:a443637829c1
remove LuaNumber
git-svn-id: https://luan-java.googlecode.com/svn/trunk@47 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 27 Dec 2012 01:48:36 +0000 |
parents | 57054fa43189 |
children |
line wrap: on
line diff
--- a/src/luan/interp/LuaParser.java Thu Dec 27 00:44:58 2012 +0000 +++ b/src/luan/interp/LuaParser.java Thu Dec 27 01:48:36 2012 +0000 @@ -17,7 +17,6 @@ import org.parboiled.support.ValueStack; import org.parboiled.errors.ErrorUtils; import luan.Lua; -import luan.LuaNumber; import luan.LuaState; import luan.LuaSource; @@ -304,7 +303,7 @@ return Sequence( start.set(currentIndex()), Keyword("for"), Name(), '=', Spaces(), Expr(), Keyword("to"), Expr(), - push( new ConstExpr(LuaNumber.of(1)) ), // default step + push( new ConstExpr(1) ), // default step Optional( Keyword("step"), drop(), @@ -892,13 +891,6 @@ } Rule NumberLiteral() { - return Sequence( - Number(), - push(LuaNumber.of((Double)pop())) - ); - } - - Rule Number() { return FirstOf( Sequence( IgnoreCase("0x"), @@ -906,7 +898,7 @@ ), Sequence( DecNumber(), - push(Double.parseDouble(match())) + push(Double.valueOf(match())) ) ); }