Commit 0bb52b2
committed
syntax: allow
Inside `arrayElems`, the lexer always tokenized `[` as `leftBrack`, so
the parser treated `foo[0-9]` and `"foo"[0-9]` inside `a=( ... )` as
malformed `[idx]=val` assignments. Only emit `leftBrack` when `[`
begins a new element (after whitespace, `(`, or a newline); otherwise
fall through to `advanceLitNone` so it joins the preceding word as a
glob.
Fixes #1322.[ glob in array elements1 parent 5ca0d0d commit 0bb52b2
2 files changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4922 | 4922 | | |
4923 | 4923 | | |
4924 | 4924 | | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
4925 | 4943 | | |
4926 | 4944 | | |
4927 | 4945 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
0 commit comments