1
0
forked from aniani/vim

745 Commits

Author SHA1 Message Date
Bram Moolenaar
792f786aad patch 8.2.2034: Vim9: list unpack in for statement not compiled yet
Problem:    Vim9: list unpack in for statement not compiled yet.
Solution:   Compile list unpack. (closes #7345)
2020-11-23 08:31:18 +01:00
Bram Moolenaar
6abdcf8285 patch 8.2.2033: Vim9: :def without argument gives compilation error
Problem:    Vim9: :def without argument gives compilation error.
Solution:   Add the DEF instruction. (closes #7344)
2020-11-22 18:15:44 +01:00
Bram Moolenaar
bebaa0d5c0 patch 8.2.2020: some compilers do not like the "namespace" argument
Problem:    Some compilers do not like the "namespace" argument.
Solution:   Rename to "use_namespace". (closes #7332)
2020-11-20 18:59:19 +01:00
Bram Moolenaar
2bede173a1 patch 8.2.2015: Vim9: literal dict #{} is not like any other language
Problem:    Vim9: literal dict #{} is not like any other language.
Solution:   Support the JavaScript syntax.
2020-11-19 18:53:18 +01:00
Bram Moolenaar
79cdf80bed patch 8.2.2013: Vim9: not skipping white space after unary minus
Problem:    Vim9: not skipping white space after unary minus.
Solution:   Skip whitespace. (closes #7324)
2020-11-18 17:39:05 +01:00
Bram Moolenaar
8e02faf4e9 patch 8.2.2010: Vim9: compiling fails for unreachable return statement
Problem:    Vim9: compiling fails for unreachable return statement.
Solution:   Fix it. (closes #7319)
2020-11-18 16:35:02 +01:00
Bram Moolenaar
b3a01946b3 patch 8.2.2004: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize "ufunc". (John Marriott)
2020-11-17 19:56:09 +01:00
Bram Moolenaar
52bf81c2d5 patch 8.2.2002: Vim9: lambda argument shadowed by function name
Problem:    Vim9: lambda argument shadowed by function name.
Solution:   Let function name be shadowed by lambda argument. (closes #7313)
2020-11-17 18:50:44 +01:00
Bram Moolenaar
fc74d03e76 patch 8.2.2000: Vim9: dict.key assignment not implemented yet
Problem:    Vim9: dict.key assignment not implemented yet.
Solution:   Implement dict.key assignment. (closes #7312)
2020-11-16 22:11:49 +01:00
Bram Moolenaar
193f6201b4 patch 8.2.1996: Vim9: invalid error for argument of extend()
Problem:    Vim9: invalid error for argument of extend().
Solution:   Check if the type could match. (closes #7299)
2020-11-16 20:08:35 +01:00
Bram Moolenaar
ea2d407f9c patch 8.2.1977: Vim9: error for using a string in a condition is confusing
Problem:    Vim9: error for using a string in a condition is confusing.
Solution:   Give a more specific error.  Also adjust the compile time type
            checking for || and &&.
2020-11-12 12:08:51 +01:00
Bram Moolenaar
8cebd43e97 patch 8.2.1968: Vim9: has() assumes a feature does not change dynamically
Problem:    Vim9: has() assumes a feature does not change dynamically.
Solution:   Check whether a feature may change dynamically. (closes #7265)
2020-11-08 12:49:47 +01:00
Bram Moolenaar
b4d16cb11d patch 8.2.1956: Vim9: cannot specify argument types for lambda
Problem:    Vim9: cannot specify argument types for lambda.
Solution:   Allow adding argument types.  Check arguments when calling a
            function reference.
2020-11-05 18:45:46 +01:00
Bram Moolenaar
e88c8e802c patch 8.2.1934: Vim9: command modifiers in :def function not tested
Problem:    Vim9: command modifiers in :def function not tested.
Solution:   Add tests.  Fix using modifier before filter command.
2020-11-01 17:03:37 +01:00
Bram Moolenaar
d66960bf57 patch 8.2.1927: Vim9: get unknown error with an error in a timer function
Problem:    Vim9: get unknown error with an error in a timer function.
Solution:   Use did_emsg instead of called_emsg. (closes #7231)
2020-10-30 20:46:26 +01:00
Bram Moolenaar
6cf7e3b026 patch 8.2.1915: Vim9: error for wrong number of arguments is not useful
Problem:    Vim9: error for wrong number of arguments is not useful.
Solution:   Mention whatever we have for the name. (closes #7208)
2020-10-28 14:31:16 +01:00
Bram Moolenaar
02194d2bd5 patch 8.2.1900: Vim9: command modifiers do not work
Problem:    Vim9: command modifiers do not work.
Solution:   Make most command modifiers work.
2020-10-24 23:08:38 +02:00
Bram Moolenaar
e100440158 patch 8.2.1898: command modifier parsing always uses global cmdmod
Problem:    Command modifier parsing always uses global cmdmod.
Solution:   Pass in cmdmod_T to use.  Rename struct fields consistently.
2020-10-24 20:49:43 +02:00
Bram Moolenaar
5661ed6c83 patch 8.2.1897: command modifiers are saved and set inconsistently
Problem:    Command modifiers are saved and set inconsistently.
Solution:   Separate parsing and applying command modifiers.  Save values in
            cmdmod_T.
2020-10-24 17:19:16 +02:00
Bram Moolenaar
f4c6e1e75c patch 8.2.1894: Vim9: command modifiers are not supported
Problem:    Vim9: command modifiers are not supported.
Solution:   Support "silent" and "silent!".
2020-10-23 18:02:32 +02:00
Bram Moolenaar
683581eb49 patch 8.2.1891: Vim9: skipping over expression doesn't handle line breaks
Problem:    Vim9: skipping over expression doesn't handle line breaks.
Solution:   Pass evalarg to skip_expr(). (closes #7157)
2020-10-22 21:22:58 +02:00
Bram Moolenaar
a1224cb706 patch 8.2.1884: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (John Marriott)
Solution:   Initialize with NULL.
2020-10-22 12:31:49 +02:00
Bram Moolenaar
c58f5456e5 patch 8.2.1882: Vim9: v:disallow_let is no longer needed
Problem:    Vim9: v:disallow_let is no longer needed.
Solution:   Remove v:disallow_let.
2020-10-21 20:58:52 +02:00
Bram Moolenaar
af7a9066a9 patch 8.2.1880: Vim9: asan complains about adding zero to NULL
Problem:    Vim9: Asan complains about adding zero to NULL.
Solution:   Check for argument count first.
2020-10-21 16:49:17 +02:00
Bram Moolenaar
ca17453e73 patch 8.2.1879: Vim9: argument types of insert() not checked when compiling
Problem:    Vim9: argument types of insert() not checked when compiling.
Solution:   Add argument type checks for insert().
2020-10-21 16:42:22 +02:00
Bram Moolenaar
94738d8fab patch 8.2.1876: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types for builtin functions are not checked at
            compile time.
Solution:   Add an argument type checking mechanism. Implement type checks for
            one function.
2020-10-21 14:25:07 +02:00
Bram Moolenaar
9a13e185e5 patch 8.2.1868: Vim9: no error for missing space after comma in dict
Problem:    Vim9: no error for missing space after comma in dict.
Solution:   Check for white space. (closes #6672)
2020-10-19 21:45:07 +02:00
Bram Moolenaar
80b0e5ea11 patch 8.2.1867: Vim9: argument to add() not checked for blob
Problem:    Vim9: argument to add() not checked for blob.
Solution:   Add the BLOBAPPEND instruction.
2020-10-19 20:45:36 +02:00
Bram Moolenaar
1dcae59957 patch 8.2.1865: Vim9: add() does not check type of argument
Problem:    Vim9: add() does not check type of argument.
Solution:   Inline the add() call. (closes #7160)
2020-10-19 19:02:42 +02:00
Bram Moolenaar
334a8b4bde patch 8.2.1864: Vim9: no error for wrong list type
Problem:    Vim9: no error for wrong list type.
Solution:   Add flag to indicate a constant. (closes #7160)
2020-10-19 16:07:42 +02:00
Bram Moolenaar
2ea79ad835 patch 8.2.1862: vim9: memory leak when compiling lambda fails
Problem:    vim9: memory leak when compiling lambda fails.
Solution:   Call clear_evalarg().
2020-10-18 23:32:13 +02:00
Bram Moolenaar
e13bdec6b9 patch 8.2.1855: Vim9: get error message when nothing is wrong
Problem:    Vim9: get error message when nothing is wrong.
Solution:   Check called_emsg instead of did_emsg. (closes #7143)
2020-10-16 23:16:47 +02:00
Bram Moolenaar
27491cd3ef patch 8.2.1851: Vim9: "!" followed by space incorrectly used
Problem:    Vim9: "!" followed by space incorrectly used.
Solution:   Skip over trailing spaces. (closes #7131)
2020-10-15 21:54:56 +02:00
Bram Moolenaar
209f0208f7 patch 8.2.1847: Vim9: using negative value for unsigned type
Problem:    Vim9: using negative value for unsigned type.
Solution:   Use zero instead of -1.
2020-10-15 13:57:56 +02:00
Bram Moolenaar
fbbcd00367 patch 8.2.1846: Vim9: block variables are not found in compiled function
Problem:    Vim9: variables declared in a local block are not found in
            when a function is compiled.
Solution:   Look for script variables in sn_all_vars.
2020-10-15 12:46:44 +02:00
Bram Moolenaar
f4e8cdd3d2 patch 8.2.1840: Vim9: error message is not clear about compilation error
Problem:    Vim9: error message is not clear about compilation error.
Solution:   Say "compiling" instead of "processing".
2020-10-12 22:07:13 +02:00
Bram Moolenaar
e8211a33dc patch 8.2.1817: Vim9: wrong instruction when reusing a local variable spot
Problem:    Vim9: wrong instruction when reusing a local variable spot.
Solution:   Clear a newly allocated local variable. (closes #7080)
2020-10-09 22:04:29 +02:00
Bram Moolenaar
44aefffaad patch 8.2.1802: Vim9: crash with unterminated dict
Problem:    Vim9: crash with unterminated dict. (Dhiraj Mishra)
Solution:   Return empty string instead of NULL. (closes #7084)
2020-10-05 19:23:59 +02:00
Bram Moolenaar
dda749ce85 patch 8.2.1800: Vim9: memory leak if "if" condition is invalid
Problem:    Vim9: memory leak if "if" condition is invalid.
Solution:   Free ppconst earlier.
2020-10-04 17:24:29 +02:00
Bram Moolenaar
1310660557 patch 8.2.1798: Vim9: trinary operator condition is too permissive
Problem:    Vim9: trinary operator condition is too permissive.
Solution:   Use tv_get_bool_chk().
2020-10-04 16:06:05 +02:00
Bram Moolenaar
2bb2658bef patch 8.2.1795: Vim9: operators && and || have a confusing result
Problem:    Vim9: operators && and || have a confusing result.
Solution:   Make the result a boolean.
2020-10-03 22:52:39 +02:00
Bram Moolenaar
92f26c256e patch 8.2.1794: no falsy Coalescing operator
Problem:    No falsy Coalescing operator.
Solution:   Add the "??" operator.  Fix mistake with function argument count.
2020-10-03 20:17:30 +02:00
Bram Moolenaar
c1f0066b64 patch 8.2.1789: Vim9: crash with invalid list constant
Problem:    Vim9: crash with invalid list constant. (Dhiraj Mishra)
Solution:   Return FAIL when compiling the list fails. (closes #7066)
2020-10-03 13:41:53 +02:00
Bram Moolenaar
06f9c6940a patch 8.2.1764: Vim9: no error when assigning to script var with wrong type
Problem:    Vim9: no error when assigning to script var with wrong type.
Solution:   Fix off-by-one error. (closes #7028)
2020-09-27 21:27:40 +02:00
Bram Moolenaar
2914a20abc patch 8.2.1760: Vim9: crash when end marker is missing
Problem:    Vim9: crash when end marker is missing. (Dhiraj Mishra)
Solution:   Check for end of function lines. (closes #7031)
2020-09-27 18:24:03 +02:00
Bram Moolenaar
cfcd011fcd patch 8.2.1756: Vim9: :let will soon be disallowed
Problem:    Vim9: :let will soon be disallowed.
Solution:   Add v:disallow_let temporarily.  Fix tests.
2020-09-27 15:19:27 +02:00
Bram Moolenaar
c0e29010f6 patch 8.2.1755: Vim9: crash when using invalid heredoc marker
Problem:    Vim9: crash when using invalid heredoc marker. (Dhiraj Mishra)
Solution:   Check for NULL list. (closes #7027)  Fix comment character.
2020-09-27 14:22:48 +02:00
Bram Moolenaar
30fd8204ce patch 8.2.1744: Vim9: using ":const!" is weird
Problem:    Vim9: using ":const!" is weird.
Solution:   Use "var" - "final" - "const" like Dart.  "let" still works for
            now.
2020-09-26 15:09:30 +02:00
Bram Moolenaar
9c4f55204f patch 8.2.1739: Vim9: crash when compiling a manually defined function
Problem:    Vim9: crash when compiling a manually defined function. (Antony
            Scriven)
Solution:   Check that the script ID is positive. (closes #7012)
2020-09-25 21:47:28 +02:00
Bram Moolenaar
148ce7ae62 patch 8.2.1734: Vim9: cannot use a funcref for a closure twice
Problem:    Vim9: cannot use a funcref for a closure twice.
Solution:   Instead of putting the funcref on the stack use a growarray on the
            execution context.
2020-09-23 21:57:23 +02:00