Commit 60100d1
committed
fix: guard infix reassociation against malformed operands
Recent fn-head parsing changes introduced infix reassociation branches that assume comma/when operands always carry list arguments. In the absinthe matrix CI run, a malformed intermediate AST used , which passed the guard and crashed in .
This change hardens the parser by requiring list operands before reassociation in , and by making fn-head nested-parens validation a no-op for non-list argument payloads.
This preserves existing behavior for valid AST shapes while preventing parser crashes on recoverable malformed intermediates encountered during large real-world repo parsing.1 parent 5490366 commit 60100d1
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
1379 | | - | |
| 1379 | + | |
1380 | 1380 | | |
1381 | 1381 | | |
1382 | 1382 | | |
| |||
1394 | 1394 | | |
1395 | 1395 | | |
1396 | 1396 | | |
| 1397 | + | |
| 1398 | + | |
1397 | 1399 | | |
1398 | 1400 | | |
1399 | 1401 | | |
| |||
1568 | 1570 | | |
1569 | 1571 | | |
1570 | 1572 | | |
1571 | | - | |
| 1573 | + | |
1572 | 1574 | | |
1573 | 1575 | | |
1574 | 1576 | | |
1575 | | - | |
| 1577 | + | |
1576 | 1578 | | |
1577 | 1579 | | |
1578 | 1580 | | |
| |||
0 commit comments