1
0
forked from aniani/vim

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(.
This commit is contained in:
Bram Moolenaar
2019-08-08 21:10:01 +02:00
parent 47ed553fd5
commit 5184132ec0
4 changed files with 29 additions and 4 deletions

View File

@@ -1223,12 +1223,19 @@ For methods that are also available as global functions this is the same as: >
name(expr8 [, args])
There can also be methods specifically for the type of "expr8".
"->name(" must not contain white space. There can be white space before "->"
and after the "(".
This allows for chaining, using the type that the method returns: >
This allows for chaining, passing the value that one method returns to the
next method: >
mylist->filter(filterexpr)->map(mapexpr)->sort()->join()
<
*E274*
"->name(" must not contain white space. There can be white space before the
"->" and after the "(", thus you can split the lines like this: >
mylist
\ ->filter(filterexpr)
\ ->map(mapexpr)
\ ->sort()
\ ->join()
<
*expr9*
number