about summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2017-09-23 18:17:51 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2017-09-24 17:33:07 +0100
commit85b0dd71335c8ee6d4925be6b590cbe643edf196 (patch)
tree227a562b08a3a8b5a01e1b802533a844d1fa5fbd /Src/zsh.h
parent8ddadb8afe819951891f30cfbf5061af56a231e9 (diff)
downloadzsh-85b0dd71335c8ee6d4925be6b590cbe643edf196.tar.gz
zsh-85b0dd71335c8ee6d4925be6b590cbe643edf196.tar.xz
zsh-85b0dd71335c8ee6d4925be6b590cbe643edf196.zip
Updates for ksh array element syntax.
Move detection of key/value pairs down into prefork().

Detect normal array assignment and [key]=val array assignemnt
separately.  Mark key / value pairs with Marker and pass up flag.  Deal
with marked triads specially later on.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index 27642f239..f7242dd34 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -223,9 +223,14 @@ struct mathfunc {
  * tokens here.
  */
 /*
- * Marker used in paramsubst for rc_expand_param.
- * Also used in pattern character arrays as guaranteed not to
- * mark a character in a string.
+ * Marker is used in the following special circumstances:
+ * - In paramsubst for rc_expand_param.
+ * - In pattern character arrays as guaranteed not to mark a character in
+ *   a string.
+ * - In assignments with the ASSPM_KEY_VALUE flag set in order to
+ *   mark that there is a key / value pair following.
+ * All the above are local uses --- any case where the Marker has
+ * escaped beyond the context in question is an error.
  */
 #define Marker		((char) 0xa2)
 
@@ -1969,7 +1974,14 @@ enum {
     /* SHWORDSPLIT forced off in nested subst */
     PREFORK_NOSHWORDSPLIT = 0x20,
     /* Prefork is part of a parameter subexpression */
-    PREFORK_SUBEXP        = 0x40
+    PREFORK_SUBEXP        = 0x40,
+    /* Prefork detected an assignment list with [key]=value syntax,
+     * Only used on return from prefork, not meaningful passed down.
+     * Also used as flag to globlist.
+     */
+    PREFORK_KEY_VALUE     = 0x80,
+    /* No untokenise: used only as flag to globlist */
+    PREFORK_NO_UNTOK      = 0x100
 };
 
 /*