[FIX] py.js tokenizer: numbers can have a dot in them

lp bug: https://launchpad.net/bugs/900699 fixed

bzr revid: xmo@openerp.com-20111206135045-df4e3pzzubpwr6l9
This commit is contained in:
Xavier Morel 2011-12-06 14:50:45 +01:00
parent c58ebcfaed
commit 7712b81bf1
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ var py = {};
},
number: function (str, index) {
var character = str[index];
if (!NUMBER.test(character)) {
if (!(character == '.' || NUMBER.test(character))) {
this.tokens.push(create(symbols['(number)'], {
value: parseFloat(this.builder(true).join(''))
}));