Commit graph

55 commits

Author SHA1 Message Date
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
ayazhafiz
d7abc3897b Parse abilities 2022-03-12 21:29:06 -06:00
Anton-4
454933e2c6
fixed unnecessary double indentation 2022-03-07 16:02:11 +01:00
Pierre-Henri Trivier
1d3aa26193 Fixes #2586 2022-03-04 23:50:00 +01:00
ayazhafiz
a38f1d1e8d Fmt and clippy 2022-02-19 20:54:21 -05:00
ayazhafiz
8ce81e4607 AliasHeader -> TypeHeader 2022-02-19 17:51:56 -05:00
Richard Feldman
3b1ca5c310
Refactor is_multiline for collections 2022-02-01 21:18:30 -05:00
Richard Feldman
ea5365d6cc
Make Newlines optimize better to bool 2022-01-30 20:40:50 -05:00
Richard Feldman
5c6d2a909e
Make Collection formattable 2022-01-30 20:40:50 -05:00
Folkert
eb08c12099 format as aliases with parens 2022-01-23 21:45:06 +01:00
Richard Feldman
c1c0ffb25f Use UppercaseIdent over PlatformRigids 2022-01-23 11:13:23 -05:00
ayazhafiz
966198a6e7 Coalesce inline and normal alias headers
Unifies `As` annotations and `Alias` defs to use a common struct for
defining alias header information, i.e. the name and type variables of
the alias.
2021-12-26 09:37:56 -06:00
ayazhafiz
597a1cef3b Attach location to alias header name 2021-12-26 09:17:27 -06:00
ayazhafiz
11da888c07 Pull out alias header as its own struct 2021-12-26 09:07:12 -06:00
ayazhafiz
2cd5bf8c03 Parse "as" aliases into tag/args rather than arbitrary annotations 2021-12-26 08:44:09 -06:00
Joshua Warner
f19220473a Rename Located -> Loc 2021-12-22 19:18:22 -08:00
Joshua Warner
48c207bb06 Remove trailing whitespace from the output of the formatter 2021-12-18 17:14:14 -08:00
Joshua Warner
0786e554c6 Extract spacing from parse::header::* items into explicit Spaced enum 2021-12-14 19:53:20 -08:00
Joshua Warner
86c8764012 Detangle lifetime annotations for Formattable 2021-12-14 19:52:53 -08:00
Joshua Warner
49228c8100 Refactor format_sequence to be a function 2021-12-07 18:53:47 -08:00
Joshua Warner
e3f2f8d9a4 keep indent state in fmt Buf 2021-12-04 18:26:32 -08:00
Richard Feldman
74b8076bab
Merge pull request #2081 from rtfeldman/joshuawarner32/private-tag-fmt
Fix formatting of private tags
2021-11-26 18:03:31 -05:00
Joshua Warner
799e340c01 Fix formatting of private tags 2021-11-26 13:50:12 -08:00
Joshua Warner
08e8b93bb6 Fix formatting in the presence of a package name in TypeAnnotation::Apply 2021-11-26 11:03:01 -08:00
Joshua Warner
24f7692a73 Implement [more] app header formatting
Also, refactor out a utility method to format a Collection. This method can currently
replace some of the formatting done in module headers - but the goal is eventually
to be able to replace the code in fmt_list as well, such that there is 'one true way'
to format collections.
2021-11-23 12:19:43 -08:00
Joshua Warner
7f5b873357 Parse _ in type annotations as an 'Inferred' type 2021-11-17 17:59:40 -08:00
Joshua Warner
9bf1674946 Shrink Collection to make parse_expr_size test pass 2021-11-13 16:17:44 -08:00
Joshua Warner
1fabc64fdf Use Collection in Expr::TagUnion 2021-11-13 07:38:39 -08:00
Joshua Warner
4df0880e7a Commit local changes (whoops!) 2021-11-11 18:57:26 -08:00
Joshua Warner
04d4a8ca79 Introduce Collection as a general abstraction in the ast 2021-11-11 14:49:33 -08:00
Chadtech
2ca9dad156 Do not add parens around exprs if they are not needed in formatting 2021-10-16 13:30:32 -04:00
Sébastien Besnier
1f4e0985e6 cargo fmt 2020-11-26 08:45:09 +01:00
Sébastien Besnier
b0a8e96d34 remove unreachable! in favor of debug_assert!(false); 2020-11-26 08:39:01 +01:00
Richard Feldman
6d6077db27 Drop some dbg! calls 2020-11-25 23:07:19 -05:00
Sébastien Besnier
1ebac5e332 format correctly comment in empty record annotation 2020-11-25 16:06:51 +01:00
Sébastien Besnier
aa3ce94f86 fix formating newlines 2020-11-25 15:44:58 +01:00
Sébastien Besnier
7361f62902 format properly multiline type annotations 2020-11-25 15:15:32 +01:00
Sébastien Besnier
b1548ff4e8 refactor tag union and record type annotations formatting 2020-11-21 20:36:26 +01:00
Sébastien Besnier
52bace2c25 store the final comments in the AST for record & tag union annotations 2020-11-21 20:36:26 +01:00
Sébastien Besnier
c692319fb9 correctly format multiline record type annotation 2020-11-21 20:36:26 +01:00
Sébastien Besnier
c4bc98a81f remove fmt_condition_spaces in favor of fmt_comments_only 2020-11-15 10:36:50 +01:00
Sébastien Besnier
25192fca10 make fmt_comments_only more general 2020-11-15 10:26:14 +01:00
Richard Feldman
3eea2c934e Fix an annotation formatting regression 2020-07-18 22:17:41 -04:00
Richard Feldman
8b53ec15fe Change guard to DestructType 2020-07-18 12:42:04 -04:00
Folkert
6bc657616d clean up comments 2020-07-12 00:37:05 +02:00
Folkert
d7b2dc7a3b fix test failures caused by def reordering 2020-07-11 02:01:23 +02:00
Folkert
46639c5081 cleanup and comments 2020-07-11 01:51:38 +02:00
Folkert
ba38d4ec14 cleanup 2020-07-10 23:54:00 +02:00
Folkert
d6bdb45c82 Back in working order 2020-07-10 23:54:00 +02:00