Add workaround for https://github.com/espruino/Espruino/issues/1868 since 2v06 firmware has the issue

pull/514/head
Gordon Williams 2020-06-26 09:26:41 +01:00
parent e859c3d20c
commit dcf8c6c1f3
1 changed files with 2 additions and 0 deletions

View File

@ -6605,6 +6605,8 @@ To add a new serial device, you must add an object to
var tokenString = code.substring(tok.startIdx, tok.endIdx);
var tokenId = LEX_OPERATOR_START + TOKENS.indexOf(tokenString);
if (tokenId<LEX_OPERATOR_START) tokenId=undefined;
// Workaround for https://github.com/espruino/Espruino/issues/1868
if (tokenString=="catch") tokenId=undefined;
//console.log("prev "+JSON.stringify(previousString)+" next "+tokenString);
if (tok.str=="(" || tok.str=="{" || tok.str=="[") brackets++;