integrated-application-development / integrated-application-development/pasfmt

Improve heuristics for declarations

Open
#170 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
105
Forks
20
PR merge metrics
No merged PRs in 30d

Description

At the moment, `const` declarations and some `type` declarations are all formatted in the same way (when forced to wrap).
```delphi
const
A: TRec = (
A: 1;
B: 2
);
A: array of TRec = (
(
A: 1;
B: 2
)
);
// This one is weird/wrong
A =
(
18
+ 1)
/ 2;
type
A = (
A,
B
);
```
All of these constructs are different and should be treated slightly differently. Improving the heuristics would produce better formatting in the case of the expression to improve consistency across the formatter.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.