}
else if (expr[0] == '=' && expr[1] == '<' && expr[2] == '<')
{
- list_T *l;
+ list_T *l = NULL;
long cur_lnum = SOURCING_LNUM;
- // HERE document
- l = heredoc_get(eap, expr + 3, FALSE, FALSE);
+ // :let text =<< [trim] [eval] END
+ // :var text =<< [trim] [eval] END
+ if (vim9script && !eap->skip && (!VIM_ISWHITE(expr[-1])
+ || !IS_WHITE_OR_NUL(expr[3])))
+ semsg(_(e_white_space_required_before_and_after_str_at_str),
+ "=<<", expr);
+ else
+ l = heredoc_get(eap, expr + 3, FALSE, FALSE);
+
if (l != NULL)
{
rettv_list_set(&rettv, l);
STOP
END
v9.CheckDefAndScriptFailure(lines, 'E1012: Type mismatch; expected number but got list<string>', 1)
+
+ lines =<< trim END
+ var lines=<< STOP
+ xxx
+ STOP
+ END
+ v9.CheckDefAndScriptFailure(lines, 'E1004: White space required before and after ''=<<'' at "=<< STOP"', 1)
+ lines =<< trim END
+ var lines =<<STOP
+ xxx
+ STOP
+ END
+ v9.CheckDefAndScriptFailure(lines, 'E1004: White space required before and after ''=<<'' at "=<<STOP"', 1)
+ lines =<< trim END
+ var lines=<<STOP
+ xxx
+ STOP
+ END
+ v9.CheckDefAndScriptFailure(lines, 'E1004: White space required before and after ''=<<'' at "=<<STOP"', 1)
enddef
def Test_var_func_call()