Skip to content

Commit e306dad

Browse files
committed
add alt-enter for the case where a line ends on an operator that expects another argument - fixes espruino/Espruino#1629
1 parent 6061e44 commit e306dad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/codeWriter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
} else if (tok.str==")" && statementBeforeBrackets) {
180180
statementBeforeBrackets = false;
181181
statement = true;
182-
} else if (tok.str=="=" || tok.str=="do") {
182+
} else if (["=","^","&&","||","+","+=","-","-=","*","*=","/","/=","%","%=","&","&=","|","|="].indexOf(tok.str)>=0) {
183183
statement = true;
184184
} else {
185185
if (tok.str==";") varDeclaration = false;

0 commit comments

Comments
 (0)