diff options
| author | tjg <tjg> | 2001-10-01 12:54:26 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:19 +0100 |
| commit | 8ce5bc05bcf9b263a65eb6e8d6bae0e610a88b16 (patch) | |
| tree | d1e35e9054b5ab6d82c0c277b80da892782b6033 /parse.y | |
| parent | 593a3857b992c85038276eb0e4c8aa20d796f3de (diff) | |
Bug: it's no longer possible to use parentheses to sneak a word that
needs quoting past the "quoting detector", so `fn x { echo $(x.y) }'
now works both in the current rc and its descendants.
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -124,7 +124,7 @@ first : comword | first '^' sword { $$ = mk(nConcat,$1,$3); } sword : comword - | keyword { $$ = mk(nWord,$1, NULL); } + | keyword { $$ = mk(nWord, $1, NULL, FALSE); } word : sword | word '^' sword { $$ = mk(nConcat,$1,$3); } @@ -139,7 +139,7 @@ comword : '$' sword { $$ = mk(nVar,$2); } | BACKBACK word sword { $$ = mk(nBackq,$2,$3); } | '(' nlwords ')' { $$ = $2; } | REDIR brace { $$ = mk(nNmpipe,$1.type,$1.fd,$2); } - | WORD { $$ = ($1.w[0] == '\'') ? mk(nQword, $1.w+1, NULL) : mk(nWord,$1.w, $1.m); } + | WORD { $$ = mk(nWord, $1.w, $1.m, $1.q); } keyword : FOR { $$ = "for"; } | IN { $$ = "in"; } @@ -166,7 +166,7 @@ optnl : /* empty */ %% void initparse() { - star = treecpy(mk(nVar,mk(nWord,"*",NULL)), ealloc); - nolist = treecpy(mk(nVar,mk(nWord,"ifs",NULL)), ealloc); + star = treecpy(mk(nVar, mk(nWord,"*", NULL, FALSE)), ealloc); + nolist = treecpy(mk(nVar, mk(nWord,"ifs", NULL, FALSE)), ealloc); } |