Commit graph

313 commits

Author SHA1 Message Date
Folkert
a7163191f0
fix dbg uses and such 2022-06-15 18:03:40 +02:00
Folkert
8b72782ea2
Merge remote-tracking branch 'origin/trunk' into parse-expr-defs-soa 2022-06-01 13:15:39 +02:00
Folkert
93e4bff855
renames 2022-06-01 13:11:23 +02:00
Folkert
22cd581edc
clippy 2022-06-01 13:08:10 +02:00
Folkert
ad9d06bd63
use Defs in the parse::ast::Expr 2022-06-01 12:54:40 +02:00
Sean Hagstrom
d9d708fc94
formatter: fix indentation for multi-line lambdas in pipeline expression 2022-06-01 08:53:13 +01:00
Sean Hagstrom
802cf20637
formatter: remove spaces from regions inside module AST definitions 2022-06-01 08:53:13 +01:00
Richard Feldman
ea644c3360
Merge pull request #3132 from rtfeldman/parse-def-soa 2022-05-28 01:55:01 -04:00
Folkert
fa9ac912a0
parse defs with the new approach 2022-05-26 14:14:39 +02:00
Folkert
72518bca9c
fix clippy things 2022-05-25 15:28:14 +02:00
Folkert
d72ebf4b74
formatting for Defs 2022-05-25 14:58:36 +02:00
Sean Hagstrom
e2e77a2324
formatter: add newlines between parens delimiters for multiline expressions 2022-05-24 11:19:30 +01:00
Folkert
2ae804790a
parse toplevel defs into an SOA structure 2022-05-23 22:07:37 +02:00
Sean Hagstrom
c53f6cf2fe
formatter: remove spaces at the beginning and end of single-line square bracket expressions 2022-05-22 14:06:34 +01:00
Sean Hagstrom
4981f081a7
formatter: refactor fmt_collection to receive enum for braces type 2022-05-22 11:44:10 +01:00
Sean Hagstrom
c7e6547c9a
formatter: support outdenting multi-line annotations for record types and tag unions 2022-05-21 20:18:32 +01:00
Ayaz
e5eb9c9f1c
Merge pull request #3052 from rtfeldman/build-encode
Encode/JSON in standard library typechecks
2022-05-19 21:16:59 -04:00
ayazhafiz
7a732c7d4a
Fix ability formatting 2022-05-19 18:30:36 -04:00
Ayaz Hafiz
e78b345ee0
Format has-derived clauses 2022-05-19 18:29:31 -04:00
ayazhafiz
b1d46d87ae
Fix ability formatting 2022-05-19 18:21:44 -04:00
ayazhafiz
355b573695
Format Json 2022-05-19 18:21:44 -04:00
Sean Hagstrom
08777434b6
formatter: support removing blank lines between all when branches in when expressions 2022-05-19 09:26:04 +01:00
Sean Hagstrom
802422e6f4
formatter: support removing blank lines between when branches if all branches are single line 2022-05-19 09:07:31 +01:00
Sean Hagstrom
7def844302
formatter: support allowing single line value expressions in when expressions 2022-05-19 09:07:30 +01:00
Sean Hagstrom
1f98691929
formatter: refactor code for formatting when expressions 2022-05-19 09:07:30 +01:00
Ayaz Hafiz
50769b81e6
Format other stdlib modules 2022-05-18 15:40:02 -04:00
Ayaz Hafiz
f2eb87a524
Format Dict 2022-05-18 15:32:36 -04:00
Ayaz Hafiz
521f1e2c6c
Format bool builtins 2022-05-18 14:31:44 -04:00
Ayaz Hafiz
33945a7d5c
Add env var for workspace root and scaffold builtins fmt test 2022-05-18 14:30:03 -04:00
Richard Feldman
2c09907116
Merge pull request #3078 from rtfeldman/formatter-multiline-fn-type-annotated-bodies
Fix multi-line function type annotations for annotated bodies
2022-05-17 23:25:21 -04:00
Richard Feldman
56896f7624
Merge pull request #3080 from rtfeldman/formatter-cli-panic-ast-diff
Fix AST normalization of TypeHeaders in Aliases for CLI formatter
2022-05-17 23:23:10 -04:00
Sean Hagstrom
be798974c2
fix(formatter): ensure we normalize TypeHeaders in Aliases when comparing ASTs when running cli formatting 2022-05-16 22:25:33 +01:00
Sean Hagstrom
98a174c984
fix(formatter): ensure multi-line function type annotations for annotated bodies are indented properly 2022-05-16 22:25:01 +01:00
Sean Hagstrom
750ca52deb
improvement(formatter): format empty record patterns without spaces 2022-05-16 22:23:58 +01:00
Anton-4
0f59f3097a
cargo fix --edition 2022-05-16 17:04:17 +02:00
Sean Hagstrom
b91d6aa5a9 fix(formatter): ensure arguments and return value in multi-line function annotation are on separate lines
Added tests based on the examples in: Issue #2587
Removed outdated comment and debug_assert statement
Updated the tests for multi-line higher order function annotations
2022-05-14 14:23:56 +01:00
Richard Feldman
fd40fed937
Fix a bunch of errors from clippy --tests 2022-05-10 15:21:48 -04:00
Richard Feldman
36255b056b
Test expected == actual after verifying idempotence 2022-05-06 14:45:59 -04:00
Richard Feldman
a8991dc268
Trim inputs and expected in fmt tests 2022-05-06 14:37:23 -04:00
Richard Feldman
eb1d572b24
Test that modules reformat stably too 2022-05-06 14:37:23 -04:00
Richard Feldman
ad51624eb2
Write a better test for tui example 2022-05-06 14:37:23 -04:00
Richard Feldman
eb8e7d6a97
Verify stable formatting in fmt tests 2022-05-06 14:37:22 -04:00
Richard Feldman
c0f18f1c52
Move RemoveSpaces into fmt, for use in tests 2022-05-06 14:37:22 -04:00
Richard Feldman
7be5948476
Add formatter test 2022-05-06 14:37:22 -04:00
Richard Feldman
2c3731f7de
Drop an unnecessary lifetime annotation 2022-05-06 12:06:28 -04:00
Sean Hagstrom
4707528caa feature(formatter): allow single blank line around comments in lists, records, type annotations 2022-05-01 18:28:49 +01:00
Sean Hagstrom
e6621e5167 remove outdated test for inline comment formatting
I tested if the formatter was still inconsistent by locally changing the helloWorld example to have:
```
main =
    greeting = "Hello, World!\n" # This variable is for greeting

    greeting
```
And running the formatter multiple times with `cargo run -- formatter`.
At the moment the results are consistent and the inline comments remains inlined.
2022-04-30 14:37:53 +01:00
Sean Hagstrom
e36aad6310 fix(formatter): format and allow inline comments for defs 2022-04-30 14:34:33 +01:00
Richard Feldman
85e7969c2d
Replace references to "global tag" with "tag" 2022-04-25 17:04:34 -04:00
Ayaz Hafiz
1ed9cf551a
Remove private tags from Ast 2022-04-25 11:20:37 -04:00