[FIX] py.js: bug in tokenization of single-quoted empty string

bzr revid: xmo@openerp.com-20121129132738-fcnam8bkqyt7h8ey
This commit is contained in:
Xavier Morel
2012-11-29 14:27:38 +01:00
parent 9f76458404
commit 759f11f110
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
repo: 076b192d0d8ab2b92d1dbcfa3da055382f30eaea
node: ccf62e5d0291f66a39f4049f3e880004e59c3654
node: 2b62048dd1d86c45e4bf0442b5da4122534132bf
branch: default
latesttag: 0.7
latesttagdistance: 4
latesttagdistance: 5
+1 -1
View File
@@ -311,7 +311,7 @@ var py = {};
} else if (string_pattern.test(token)) {
var m = string_pattern.exec(token);
tokens.push(create(symbols['(string)'], {
value: m[2] || m[3]
value: (m[2] !== undefined ? m[2] : m[3])
}));
} else if (token in symbols) {
var symbol;