comparison macro.c @ 88:36066289e31a

Always send the expansion state an EOF. (even if the state machine generates an error)
author David A. Holland
date Mon, 10 Jun 2013 21:57:21 -0400
parents 2b153df78214
children 60184aa42604
comparison
equal deleted inserted replaced
87:2b153df78214 88:36066289e31a
1029 void 1029 void
1030 expand_got_eof(struct expstate *es, struct place *p) 1030 expand_got_eof(struct expstate *es, struct place *p)
1031 { 1031 {
1032 switch (es->state) { 1032 switch (es->state) {
1033 case ES_NORMAL: 1033 case ES_NORMAL:
1034 expand_send_eof(es, p);
1035 break; 1034 break;
1036 case ES_WANTLPAREN: 1035 case ES_WANTLPAREN:
1037 expand_missingargs(es, p, false); 1036 expand_missingargs(es, p, false);
1038 break; 1037 break;
1039 case ES_NOARG: 1038 case ES_NOARG:
1046 } 1045 }
1047 complain_fail(); 1046 complain_fail();
1048 expstate_destroyargs(es); 1047 expstate_destroyargs(es);
1049 break; 1048 break;
1050 } 1049 }
1050 expand_send_eof(es, p);
1051 es->state = ES_NORMAL; 1051 es->state = ES_NORMAL;
1052 es->curmacro = NULL; 1052 es->curmacro = NULL;
1053 es->argparens = 0; 1053 es->argparens = 0;
1054 } 1054 }
1055 1055