Commit 2ef0479
committed
Simplify attribute handling in
`Parser::parse_bottom_expr` currently constructs an empty `attrs` and
then passes it to a large number of other functions. This makes the code
harder to read than it should be, because it's not clear that many
`attrs` arguments are always empty.
This commit removes `attrs` and the passing, simplifying a lot of
functions. The commit also renames `Parser::mk_expr` (which takes an
`attrs` argument) as `mk_expr_with_attrs`, and introduces a new
`mk_expr` which creates an expression with no attributes, which is the
more common case.parse_bottom_expr.1 parent 1e84973 commit 2ef0479
6 files changed
+159
-208
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| |||
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
1191 | | - | |
1192 | | - | |
| 1191 | + | |
1193 | 1192 | | |
1194 | 1193 | | |
1195 | 1194 | | |
| |||
1647 | 1646 | | |
1648 | 1647 | | |
1649 | 1648 | | |
1650 | | - | |
1651 | 1649 | | |
1652 | 1650 | | |
1653 | 1651 | | |
| |||
1662 | 1660 | | |
1663 | 1661 | | |
1664 | 1662 | | |
1665 | | - | |
| 1663 | + | |
1666 | 1664 | | |
1667 | 1665 | | |
1668 | 1666 | | |
| |||
1680 | 1678 | | |
1681 | 1679 | | |
1682 | 1680 | | |
1683 | | - | |
| 1681 | + | |
1684 | 1682 | | |
1685 | 1683 | | |
1686 | 1684 | | |
| |||
1823 | 1821 | | |
1824 | 1822 | | |
1825 | 1823 | | |
1826 | | - | |
| 1824 | + | |
1827 | 1825 | | |
1828 | 1826 | | |
1829 | 1827 | | |
| |||
0 commit comments