mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
45583/0006: internal: Add some comments for orientation. No functional change.
This commit is contained in:
parent
e37df255c1
commit
fd1ef7d770
2 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,8 @@
|
||||||
2020-03-22 Daniel Shahaf <d.s@daniel.shahaf.name>
|
2020-03-22 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||||
|
|
||||||
|
* 45583/0006: Src/parse.c: internal: Add some comments for
|
||||||
|
orientation. No functional change.
|
||||||
|
|
||||||
* 45583/0005: Src/parse.c: internal: Document the WC_FUNCDEF
|
* 45583/0005: Src/parse.c: internal: Document the WC_FUNCDEF
|
||||||
data layout for anonymous functions with arguments (follow-up
|
data layout for anonymous functions with arguments (follow-up
|
||||||
to 29492)
|
to 29492)
|
||||||
|
|
16
Src/parse.c
16
Src/parse.c
|
@ -1676,7 +1676,7 @@ par_funcdef(int *cmplx)
|
||||||
zshlex();
|
zshlex();
|
||||||
|
|
||||||
p = ecadd(0);
|
p = ecadd(0);
|
||||||
ecadd(0);
|
ecadd(0); /* p + 1 */
|
||||||
|
|
||||||
while (tok == STRING) {
|
while (tok == STRING) {
|
||||||
if ((*tokstr == Inbrace || *tokstr == '{') &&
|
if ((*tokstr == Inbrace || *tokstr == '{') &&
|
||||||
|
@ -1688,9 +1688,9 @@ par_funcdef(int *cmplx)
|
||||||
num++;
|
num++;
|
||||||
zshlex();
|
zshlex();
|
||||||
}
|
}
|
||||||
ecadd(0);
|
ecadd(0); /* p + num + 2 */
|
||||||
ecadd(0);
|
ecadd(0); /* p + num + 3 */
|
||||||
ecadd(0);
|
ecadd(0); /* p + num + 4 */
|
||||||
|
|
||||||
nocorrect = 0;
|
nocorrect = 0;
|
||||||
incmdpos = 1;
|
incmdpos = 1;
|
||||||
|
@ -1728,15 +1728,15 @@ par_funcdef(int *cmplx)
|
||||||
|
|
||||||
ecadd(WCB_END());
|
ecadd(WCB_END());
|
||||||
ecbuf[p + num + 2] = so - oecssub;
|
ecbuf[p + num + 2] = so - oecssub;
|
||||||
ecbuf[p + num + 3] = ecsoffs - so;
|
ecbuf[p + num + 3] = ecsoffs - so; /* "length of string table" */
|
||||||
ecbuf[p + num + 4] = ecnpats;
|
ecbuf[p + num + 4] = ecnpats; /* "number of patterns for body" */
|
||||||
ecbuf[p + 1] = num;
|
ecbuf[p + 1] = num; /* "number of names" */
|
||||||
|
|
||||||
ecnpats = onp;
|
ecnpats = onp;
|
||||||
ecssub = oecssub;
|
ecssub = oecssub;
|
||||||
ecnfunc++;
|
ecnfunc++;
|
||||||
|
|
||||||
ecbuf[p] = WCB_FUNCDEF(ecused - 1 - p);
|
ecbuf[p] = WCB_FUNCDEF(ecused - 1 - p); /* "offset to after body" */
|
||||||
|
|
||||||
/* If it's an anonymous function... */
|
/* If it's an anonymous function... */
|
||||||
if (num == 0) {
|
if (num == 0) {
|
||||||
|
|
Loading…
Reference in a new issue