Skip to content

Commit 73fe1ca

Browse files
infix attrs and expression are encoded in the AST (#2676)
* encode the information of attribute and extension position in the AST * remove using of source to check extension syntax * format * fix bug * add test * fix comment in between % and ext * changes * fix beginend - add Space like before - format postfix atributes in postfix position. * add attribute test * consistent infix attributes spacing * add test from issue #2652 * remove extra parens * format * fmt
1 parent f710710 commit 73fe1ca

File tree

125 files changed

+1733
-1282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1733
-1282
lines changed

CHANGES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@ profile. This started with version 0.26.0.
4949
- Fix misplaced `;;` due to interaction with floating doc comments.
5050
(#2691, @EmileTrotignon)
5151

52+
- The formatting of attributes of expression is now aware of the attributes
53+
infix or postix positions: `((fun [@a] x -> y) [@b])` is formatted without
54+
moving attributes. (#2676, @EmileTrotignon)
55+
56+
- `begin%e ... end` and `begin [@a] ... end` nodes are always preserved.
57+
(#2676, @EmileTrotignon)
58+
59+
- `begin end` syntax for `()` is now preserved. (#2676, @EmileTrotignon)
60+
61+
- \* The formatting of infix extensions is now consistent with regular
62+
formatting by construction. This reduces indentation in `f @@ match%e`
63+
expressions to the level of indentation in `f @@ match`. Other unknown
64+
inconsistencies might also be fixed. (#2676, @EmileTrotignon)
65+
66+
- \* The spacing of infix attributes is now consistent across keywords. Every
67+
keyword but `begin` `function`, and `fun` had attributes stuck to the keyword:
68+
`match[@a]`, but `fun [@a]`. Now its also `fun[@a]`. (#2676, @EmileTrotignon)
69+
5270
### Changed
5371

5472
- \* `|> begin`, `~arg:begin`, `begin if`, `lazy begin`, `begin match` and

0 commit comments

Comments
 (0)