summaryrefslogtreecommitdiffstats
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-24 18:37:35 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-24 18:37:35 +0200
commit5409f5d8c95007216ae1190565a7a8ee9ebd7100 (patch)
treecbc94bc8f6560299b6ef2224f526ab53c7534bc6 /src/structs.h
parentb7e2483655d9b68df0c7349918027d800051a28a (diff)
patch 8.2.1047: Vim9: script cannot use line continuation like :def functionv8.2.1047
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.
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index ce9dfbcbfd..3a9bbd33c6 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1746,6 +1746,19 @@ typedef struct
# endif
} scriptitem_T;
+// Struct passed through eval() functions.
+// See EVALARG_EVALUATE for a fixed value with eval_flags set to EVAL_EVALUATE.
+typedef struct {
+ int eval_flags; // EVAL_ flag values below
+
+ // copied from exarg_T when "getline" is "getsourceline". Can be NULL.
+ void *eval_cookie; // argument for getline()
+} evalarg_T;
+
+// Flags for expression evaluation.
+#define EVAL_EVALUATE 1 // when missing don't actually evaluate
+#define EVAL_CONSTANT 2 // when not a constant return FAIL
+
# ifdef FEAT_PROFILE
/*
* Struct used in sn_prl_ga for every line of a script.