comparison src/vim.h @ 20397:c225be44692a v8.2.0753

patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase Commit: https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 14 22:41:15 2020 +0200 patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 14 May 2020 22:45:04 +0200
parents 220312b278a9
children 489cb75c76b6
comparison
equal deleted inserted replaced
20396:89228c88b5c4 20397:c225be44692a
2131 } use_popup_T; 2131 } use_popup_T;
2132 2132
2133 // Flags for assignment functions. 2133 // Flags for assignment functions.
2134 #define LET_IS_CONST 1 // ":const" 2134 #define LET_IS_CONST 1 // ":const"
2135 #define LET_NO_COMMAND 2 // "var = expr" without ":let" or ":const" 2135 #define LET_NO_COMMAND 2 // "var = expr" without ":let" or ":const"
2136 #define LET_REDEFINE 4 // variable can be redefined later 2136 #define LET_DISCOVERY 4 // discovery phase: variable can be redefined later
2137 2137
2138 #include "ex_cmds.h" // Ex command defines 2138 #include "ex_cmds.h" // Ex command defines
2139 #include "spell.h" // spell checking stuff 2139 #include "spell.h" // spell checking stuff
2140 2140
2141 #include "proto.h" // function prototypes 2141 #include "proto.h" // function prototypes
2660 #define REPTERM_FROM_PART 1 2660 #define REPTERM_FROM_PART 1
2661 #define REPTERM_DO_LT 2 2661 #define REPTERM_DO_LT 2
2662 #define REPTERM_SPECIAL 4 2662 #define REPTERM_SPECIAL 4
2663 #define REPTERM_NO_SIMPLIFY 8 2663 #define REPTERM_NO_SIMPLIFY 8
2664 2664
2665 // Flags for expression evaluation.
2666 #define EVAL_EVALUATE 1 // when missing don't actually evaluate
2667 #define EVAL_CONSTANT 2 // when not a constant return FAIL
2668
2665 #endif // VIM__H 2669 #endif // VIM__H