From e306dadf36ccdc34de5351ec55ea256d542258be Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Fri, 8 Mar 2019 14:07:48 +0000 Subject: [PATCH] add alt-enter for the case where a line ends on an operator that expects another argument - fixes https://github.com/espruino/Espruino/issues/1629 --- core/codeWriter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/codeWriter.js b/core/codeWriter.js index 56bdeb2..33c8b50 100644 --- a/core/codeWriter.js +++ b/core/codeWriter.js @@ -179,7 +179,7 @@ } else if (tok.str==")" && statementBeforeBrackets) { statementBeforeBrackets = false; statement = true; - } else if (tok.str=="=" || tok.str=="do") { + } else if (["=","^","&&","||","+","+=","-","-=","*","*=","/","/=","%","%=","&","&=","|","|="].indexOf(tok.str)>=0) { statement = true; } else { if (tok.str==";") varDeclaration = false;