comparison runtime/doc/eval.txt @ 17661:da7890e3359b v8.1.1828

patch 8.1.1828: not strict enough checking syntax of method invocation commit https://github.com/vim/vim/commit/5184132ec015f5889a3195d911e609d214f06bed Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 8 21:10:01 2019 +0200 patch 8.1.1828: not strict enough checking syntax of method invocation Problem: Not strict enough checking syntax of method invocation. Solution: Check there is no white space inside ->method(.
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Aug 2019 21:15:05 +0200
parents 4c7097a980a5
children 95c23e180022
comparison
equal deleted inserted replaced
17660:fc25327e28ea 17661:da7890e3359b
1221 1221
1222 For methods that are also available as global functions this is the same as: > 1222 For methods that are also available as global functions this is the same as: >
1223 name(expr8 [, args]) 1223 name(expr8 [, args])
1224 There can also be methods specifically for the type of "expr8". 1224 There can also be methods specifically for the type of "expr8".
1225 1225
1226 "->name(" must not contain white space. There can be white space before "->" 1226 This allows for chaining, passing the value that one method returns to the
1227 and after the "(". 1227 next method: >
1228
1229 This allows for chaining, using the type that the method returns: >
1230 mylist->filter(filterexpr)->map(mapexpr)->sort()->join() 1228 mylist->filter(filterexpr)->map(mapexpr)->sort()->join()
1229 <
1230 *E274*
1231 "->name(" must not contain white space. There can be white space before the
1232 "->" and after the "(", thus you can split the lines like this: >
1233 mylist
1234 \ ->filter(filterexpr)
1235 \ ->map(mapexpr)
1236 \ ->sort()
1237 \ ->join()
1231 < 1238 <
1232 1239
1233 *expr9* 1240 *expr9*
1234 number 1241 number
1235 ------ 1242 ------