Problem: Vim9: no line break allowed before comperators.
Solution: Check for comperator after line break.
{
typval_T var2;
char_u *p;
+ int getnext;
int i;
exptype_T type = EXPR_UNKNOWN;
int len = 2;
if (eval5(arg, rettv, evalarg) == FAIL)
return FAIL;
- p = *arg;
+ p = eval_next_non_blank(*arg, evalarg, &getnext);
switch (p[0])
{
case '=': if (p[1] == '=')
*/
if (type != EXPR_UNKNOWN)
{
+ if (getnext)
+ *arg = eval_next_line(evalarg);
+
// extra question mark appended: ignore case
if (p[len] == '?')
{
let x = 1
enddef
+def Test_expr4_vimscript()
+ " only checks line continuation
+ let lines =<< trim END
+ vim9script
+ let var = 0
+ < 1
+ assert_equal(1, var)
+ END
+ CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ let var = 123
+ != 123
+ assert_equal(0, var)
+ END
+ CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ let list = [1, 2, 3]
+ let var = list
+ is list
+ assert_equal(1, var)
+ END
+ CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ let myblob = 0z1234
+ let var = myblob
+ isnot 0z11
+ assert_equal(1, var)
+ END
+ CheckScriptSuccess(lines)
+enddef
+
func Test_expr4_fails()
let msg = "white space required before and after '>'"
call CheckDefFailure(["let x = 1>2"], msg)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1064,
/**/
1063,
/**/