summaryrefslogtreecommitdiff
path: root/src/ex_eval.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.3656: Vim9: no error for an evironment variable by itselfv8.2.3656Bram Moolenaar2021-11-231-1/+4
| | | | | Problem: Vim9: no error for an evironment variable by itself. Solution: Give a "without effect" error. (closes #9166)
* patch 8.2.3649: Vim9: error for variable declared in while loopv8.2.3649Bram Moolenaar2021-11-221-3/+4
| | | | | Problem: Vim9: error for variable declared in while loop. Solution: Do not keep the first variable. (closes #9191)
* patch 8.2.3645: Vim9: The "no effect" error is not given for all registersv8.2.3645Bram Moolenaar2021-11-221-7/+17
| | | | | Problem: Vim9: The "no effect" error is not given for all registers. Solution: Include any character following '@'. (closes #8779)
* patch 8.2.3559: loop variable recreated every timev8.2.3559Bram Moolenaar2021-10-231-2/+3
| | | | | Problem: Loop variable recreated every time. Solution: Keep the loop variable when looping.
* patch 8.2.3486: illegal memory access with invalid sequence of commandsv8.2.3486Bram Moolenaar2021-10-061-2/+8
| | | | | | Problem: Illegal memory access with invalid sequence of commands. Solution: Do not call leave_block() when not in a try block. (closes #8966) Reset did_emsg so that exception is shown as an error.
* patch 8.2.3478: still crash with error in :catch and also in :finallyv8.2.3478Bram Moolenaar2021-10-051-1/+5
| | | | | Problem: Still crash with error in :catch and also in :finally. Solution: Only call finish_exception() once. (closes #8954)
* patch 8.2.3470: crash with error in :catch and also in :finallyv8.2.3470Bram Moolenaar2021-10-041-1/+2
| | | | | Problem: Crash with error in :catch and also in :finally. Solution: Only discard an exception if there is one. (closes #8954)
* patch 8.2.3376: Vim9: no warning that "@r" does not do anythingv8.2.3376Bram Moolenaar2021-08-251-9/+21
| | | | | Problem: Vim9: no warning that "@r" does not do anything. Solution: Give a "no effect" error. (closes #8779)
* patch 8.2.3324: Vim9: Cannot use :silent with :endwhilev8.2.3324Bram Moolenaar2021-08-101-6/+6
| | | | | Problem: Vim9: Cannot use :silent with :endwhile. Solution: Allow for using the :silent modifier. (closes #8737)
* patch 8.2.3305: Vim9: :finally in skipped block not handled correctlyv8.2.3305rbtnn2021-08-071-1/+2
| | | | | | Problem: Vim9: :finally in skipped block not handled correctly. Solution: Check whether :finally is in a skipped block. (Naruhiko Nishino, closes #8724)
* patch 8.2.3297: cannot use all commands inside a {} blockv8.2.3297Bram Moolenaar2021-08-051-0/+12
| | | | | | Problem: Cannot use all commands inside a {} block after :command and :autocmd. Solution: Do consider \n to separate commands. (closes #8620)
* patch 8.2.3216: Vim9: crash when using variable in a loop at script levelv8.2.3216Bram Moolenaar2021-07-251-14/+4
| | | | | | | Problem: Vim9: crash when using variable in a loop at script level. Solution: Do not clear the variable if a function was defined. Do not create a new entry in sn_var_vals every time. (closes #8628)
* patch 8.2.3190: error messages are spread outv8.2.3190Bram Moolenaar2021-07-201-4/+4
| | | | | Problem: Error messages are spread out. Solution: Move error messages to errors.h and give them a clear name.
* patch 8.2.3137: Vim9: no error when a line only has a variable namev8.2.3137Bram Moolenaar2021-07-101-2/+19
| | | | | | Problem: Vim9: no error when a line only has a variable name. Solution: Give an error when an expression is evaluated without an effect. (closes #8538)
* patch 8.2.3126: Vim9: for loop error reports wrong line numberv8.2.3126Bram Moolenaar2021-07-081-0/+5
| | | | | | Problem: Vim9: for loop error reports wrong line number. Solution: Save and restore the line number when evaluating the expression. (closes #8514)
* patch 8.2.3099: Vim9: missing catch/finally not reported at script levelv8.2.3099Bram Moolenaar2021-07-041-2/+12
| | | | | Problem: Vim9: missing catch/finally not reported at script level. Solution: Give an error. (closes #8487)
* patch 8.2.2725: Vim9: message about compiling is wrong when using try/catchv8.2.2725Bram Moolenaar2021-04-051-0/+1
| | | | | Problem: Vim9: message about compiling is wrong when using try/catch. Solution: Store the compiling flag with the message. (closes #8071)
* patch 8.2.2657: Vim9: error message for declaring variable in for loopv8.2.2657Bram Moolenaar2021-03-261-7/+31
| | | | | Problem: Vim9: error message for declaring variable in for loop. Solution: Clear variables when entering block again. (closes #8012)
* patch 8.2.2652: Vim9: can use command modifier without an effectv8.2.2652Bram Moolenaar2021-03-251-0/+17
| | | | | | Problem: Vim9: can use command modifier without an effect. Solution: Give an error for a misplaced command modifier. Fix error message number.
* patch 8.2.2553: Vim9: Cannot put "|" after "{"v8.2.2553Bram Moolenaar2021-02-261-1/+1
| | | | | Problem: Vim9: Cannot put "|" after "{". Solution: Add the EX_TRLBAR flag. (issue #7904)
* patch 8.2.2417: condition stack values may be used when not setv8.2.2417Bram Moolenaar2021-01-271-0/+7
| | | | | | Problem: Condition stack values may be used when not set. Solution: Clear cs_script_var_len and cs_block_id just in case they get used later. (issue #7733)
* patch 8.2.2289: Vim9: 'cpo' can become emptyv8.2.2289Bram Moolenaar2021-01-031-1/+1
| | | | | | Problem: Vim9: 'cpo' can become empty. Solution: Use empty_option instead of an empty string. Update quickfix buffer after restoring 'cpo'. (closes #7608)
* patch 8.2.2163: crash when discarded exception is the current exceptionv8.2.2163Bram Moolenaar2020-12-191-5/+4
| | | | | Problem: Crash when discarded exception is the current exception. Solution: Compare the execption with current_exception. (closes #7499)
* patch 8.2.1870: Vim9: no need to keep all script variablesv8.2.1870Bram Moolenaar2020-10-201-2/+8
| | | | | | Problem: Vim9: no need to keep all script variables. Solution: Only keep script variables when a function was defined that could use them. Fix freeing static string on exit.
* patch 8.2.1846: Vim9: block variables are not found in compiled functionv8.2.1846Bram Moolenaar2020-10-151-2/+8
| | | | | | 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.
* patch 8.2.1845: Vim9: function defined in a block can't use block variablesv8.2.1845Bram Moolenaar2020-10-141-24/+18
| | | | | | | Problem: Vim9: function defined in a block can't use variables defined in that block. Solution: First step: Make a second hashtab that holds all script variables, also block-local ones, with more information.
* patch 8.2.1826: Vim9: cannot use a {} block at script levelv8.2.1826Bram Moolenaar2020-10-101-2/+33
| | | | | Problem: Vim9: cannot use a {} block at script level. Solution: Recognize a {} block.
* patch 8.2.1825: Vim9: accessing freed memoryv8.2.1825Bram Moolenaar2020-10-101-13/+19
| | | | | Problem: Vim9: accessing freed memory. Solution: Clear sv_name when the variable is deleted.
* patch 8.2.1824: Vim9: variables at the script level escape their scopev8.2.1824Bram Moolenaar2020-10-101-12/+56
| | | | | Problem: Vim9: variables at the script level escape their scope. Solution: When leaving a scope remove variables declared in it.
* patch 8.2.1653: expand('<stack>') does not include the final line numberv8.2.1653Bram Moolenaar2020-09-101-2/+2
| | | | | Problem: Expand('<stack>') does not include the final line number. Solution: Add the line nuber. (closes #6927)
* patch 8.2.1297: when a test fails it's often not easy to see wherev8.2.1297Bram Moolenaar2020-07-261-2/+2
| | | | | | Problem: When a test fails it's often not easy to see what the call stack is. Solution: Add more entries from the call stack in the exception message.
* patch 8.2.1281: the "trailing characters" error can be hard to understandv8.2.1281Bram Moolenaar2020-07-231-1/+1
| | | | | Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message.
* patch 8.2.1280: Ex command error cannot contain an argumentv8.2.1280Bram Moolenaar2020-07-231-22/+22
| | | | | | Problem: Ex command error cannot contain an argument. Solution: Add ex_errmsg() and translate earlier. Use e_trailing_arg where possible.
* patch 8.2.1110: Vim9: line continuation does not work in function argumentsv8.2.1110Bram Moolenaar2020-07-011-7/+1
| | | | | | Problem: Vim9: line continuation does not work in function arguments. Solution: Pass "evalarg" to get_func_tv(). Fix seeing double quoted string as comment.
* patch 8.2.1080: Vim9: no line break allowed in a for loopv8.2.1080Bram Moolenaar2020-06-281-3/+22
| | | | | Problem: Vim9: no line break allowed in a for loop. Solution: Skip line breaks in for command.
* patch 8.2.1071: Vim9: no line break allowed inside a lambdav8.2.1071Bram Moolenaar2020-06-271-0/+1
| | | | | Problem: Vim9: no line break allowed inside a lambda. Solution: Handle line break inside a lambda in Vim9 script.
* patch 8.2.1049: Vim9: leaking memory when using continuation linev8.2.1049Bram Moolenaar2020-06-241-6/+6
| | | | | | Problem: Vim9: leaking memory when using continuation line. Solution: Keep a pointer to the continuation line in evalarg_T. Centralize checking for a next command.
* patch 8.2.1047: Vim9: script cannot use line continuation like :def functionv8.2.1047Bram Moolenaar2020-06-241-2/+5
| | | | | | Problem: Vim9: script cannot use line continuation like in a :def function. Solution: Pass the getline function pointer to the eval() functions. Use it for addition and multiplication operators.
* patch 8.2.0967: unnecessary type casts for vim_strnsave()v8.2.0967Bram Moolenaar2020-06-121-3/+3
| | | | | Problem: Unnecessary type casts for vim_strnsave(). Solution: Remove the type casts.
* patch 8.2.0823: Vim9: script reload test is disabledv8.2.0823Bram Moolenaar2020-05-251-15/+32
| | | | | | | Problem: Vim9: script reload test is disabled. Solution: Compile a function in the context of the script where it was defined. Set execution stack for compiled function. Add a test that an error is reported for the right file/function.
* patch 8.2.0753: Vim9: expressions are evaluated in the discovery phasev8.2.0753Bram Moolenaar2020-05-141-1/+2
| | | | | | Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants.
* patch 8.2.0612: Vim9: no check for space before #commentv8.2.0612Bram Moolenaar2020-04-201-4/+7
| | | | | Problem: Vim9: no check for space before #comment. Solution: Add space checks.
* patch 8.2.0570: Vim9: no error when omitting type from argumentv8.2.0570Bram Moolenaar2020-04-131-2/+5
| | | | | Problem: Vim9: no error when omitting type from argument. Solution: Enforce specifying argument types.
* patch 8.2.0502: Vim9: some code is not testedv8.2.0502Bram Moolenaar2020-04-021-1/+1
| | | | | Problem: Vim9: some code is not tested. Solution: Add more tests. Fix uncovered problems.
* patch 8.2.0149: maintaining a Vim9 branch separately is more workv8.2.0149Bram Moolenaar2020-01-261-12/+11
| | | | | Problem: Maintaining a Vim9 branch separately is more work. Solution: Merge the Vim9 script changes.
* patch 8.2.0056: execution stack is incomplete and inefficientv8.2.0056Bram Moolenaar2019-12-291-3/+4
| | | | | | Problem: Execution stack is incomplete and inefficient. Solution: Introduce a proper execution stack and use it instead of sourcing_name/sourcing_lnum. Create a string only when used.
* patch 8.2.0013: not using a typedef for condstackv8.2.0013Bram Moolenaar2019-12-161-21/+21
| | | | | Problem: Not using a typedef for condstack. Solution: Add a typedef.
* patch 8.1.2379: using old C style commentsv8.1.2379Bram Moolenaar2019-12-011-183/+181
| | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate.
* patch 8.1.2341: not so easy to interrupt a script programaticallyv8.1.2341Bram Moolenaar2019-11-251-0/+1
| | | | | Problem: Not so easy to interrupt a script programatically. Solution: Add the interrupt() function. (Yasuhiro Matsumoto, closes #2834)
* patch 8.1.1891: functions used in one file are globalv8.1.1891Bram Moolenaar2019-08-201-2/+2
| | | | | Problem: Functions used in one file are global. Solution: Add "static". (Yegappan Lakshmanan, closes #4840)