diff options
| author | Toby Goodwin <tjg@star.le.ac.uk> | 2001-10-12 10:25:58 +0100 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:22:10 +0100 |
| commit | 609a278bf6e301ea9a021793de314ddcadb806ba (patch) | |
| tree | f8dac56d9eccbc46d5105d0206fe607ace82c3a8 /heredoc.c | |
| parent | 14106ccc3b2cb03c8b9a1df1a1b3e3953aaee2f8 (diff) | |
beta: rc-1.6b3
Diffstat (limited to 'heredoc.c')
| -rw-r--r-- | heredoc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -82,14 +82,14 @@ static Node *parseheredoc(char *s) { while ((c = *s++) != '\0' && c != '$') ; *--s = '\0'; - node = mk(nQword, begin, NULL); + node = mk(nWord, begin, NULL); break; } case '$': { char *begin = ++s, *var; c = *s++; if (c == '$') { - node = mk(nQword, "$", NULL); + node = mk(nWord, "$", NULL); c = *s; } else { size_t len = 0; @@ -129,7 +129,7 @@ extern int heredoc(int end) { char *s = readheredoc(here->name); if (dead) return FALSE; - n->u[2].p = here->quoted ? mk(nQword, s, NULL) : parseheredoc(s); + n->u[2].p = here->quoted ? mk(nWord, s, NULL, FALSE) : parseheredoc(s); n->u[0].i = rHerestring; } while ((here = here->n) != NULL); } @@ -140,7 +140,7 @@ extern int heredoc(int end) { extern int qdoc(Node *name, Node *n) { Hq *new, **prev; - if (name->type != nWord && name->type != nQword) { + if (name->type != nWord) { yyerror("eof-marker not a single literal word"); flushu(); return FALSE; @@ -149,7 +149,7 @@ extern int qdoc(Node *name, Node *n) { ; *prev = new = nnew(Hq); new->name = name->u[0].s; - new->quoted = (name->type == nQword); + new->quoted = name->u[2].i; new->doc = n; new->n = NULL; return TRUE; |