Commit graph

83 commits

Author SHA1 Message Date
Folkert
f76a75b00e formatting fixes 2022-01-23 21:25:20 +01:00
Jan Van Bruggen
1e9d2d1239 Remove accidental trailing spaces 2022-01-18 22:25:46 -07:00
Joshua Warner
8b58d5cbc7 Switch to always encoding package names / paths as strings
This will simplify parsing and make it possible to have a uniform lexer for the language. Previously unquoted package names were allowed to include '-'s, which aren't valid identifiers.

In the future, we'll distinguish local paths from packages in the package-manager by looking for a ".roc" suffix, which should only be present in local paths.
2021-12-23 20:11:14 -08:00
Joshua Warner
825b93696c Improve error message & comment 2021-12-21 18:23:04 -08:00
Joshua Warner
6786acb939 Remove redundant space in aliases 2021-12-21 18:16:58 -08:00
Joshua Warner
4fed812389 add test_fmt_examples 2021-12-21 17:25:36 -08:00
Joshua Warner
61cdbd1531 Fix formatting of pipelined call exprs 2021-12-18 16:36:51 -08:00
Richard Feldman
cb4a74ac46
Merge pull request #2233 from rtfeldman/joshuawarner32/encapsulate-state
Encapsulate the `bytes` field of State in the parser
2021-12-17 14:42:06 -05:00
Joshua Warner
49818343dd extract state 2021-12-16 17:13:53 -08:00
Joshua Warner
c36b853286 Also assert module formatting is stable 2021-12-16 17:07:05 -08:00
Jan Van Bruggen
d03a51c75b Rename base package to pf everywhere, to match tutorial 2021-12-12 05:57:39 -07:00
Folkert
873ccc5d96 remove incorrect space 2021-12-06 09:45:11 +01:00
Folkert de Vries
8459339230
Merge branch 'trunk' into joshuawarner32/keep-trailing-comments 2021-12-06 09:19:13 +01:00
Joshua Warner
f3ed335a6c Remove unused import 2021-12-05 12:59:15 -08:00
Joshua Warner
e6eb9138f7 Improve TypedIdent spacing in formatting 2021-12-05 12:58:48 -08:00
Joshua Warner
f3dd9e411f Keep trailing comments at the end of a file 2021-12-05 12:19:58 -08:00
Joshua Warner
e3f2f8d9a4 keep indent state in fmt Buf 2021-12-04 18:26:32 -08:00
Joshua Warner
4bbe1d308a rename expect_format_helper and add comment 2021-12-03 19:32:44 -08:00
Joshua Warner
5d3d4467c1 Fix indentation & stability in with formatting 2021-12-03 13:33:25 -08:00
Joshua Warner
270cc49867 Also check formatting is stable in tests; ignore a test that's invalid / incorrect 2021-12-02 17:46:50 -08:00
Richard Feldman
23fda0819f
Merge pull request #2112 from rtfeldman/joshuawarner32/fix-defs-indenting
Fix fmt_spaces indenting in the context of 3 or more newlines
2021-12-01 21:58:58 -05:00
Richard Feldman
ed40a8fc1c
Merge pull request #2114 from rtfeldman/joshuawarner32/fix-det-indentation
Fix indentation within parens
2021-12-01 19:38:07 -05:00
Joshua Warner
6edb376fdd Modify test to make the problem clear 2021-12-01 16:14:27 -08:00
Joshua Warner
c6116ba3ca Fix fmt_spaces indenting in the context of 3 or more newlines 2021-12-01 16:14:27 -08:00
Folkert de Vries
d37ddeb162
Merge pull request #2113 from rtfeldman/joshuawarner32/fix-indentation-within-parens
Fix formatting of if as an left-hand-side of an operator
2021-12-01 13:38:22 +01:00
Joshua Warner
c0abf86f01 Fix indentation within parens 2021-11-30 17:55:50 -08:00
Joshua Warner
3228a23c98 Fix formatting of if as an left-hand-side of an operator 2021-11-30 17:53:26 -08:00
Joshua Warner
fdeafe4bab Make assert output more understandable 2021-11-30 17:48:24 -08:00
Folkert de Vries
d0da22edfa
Merge pull request #2089 from rtfeldman/joshuawarner32/fix-backpassing-formatting
Fix formatting of applies in backpassing
2021-11-27 15:46:10 +01:00
Joshua Warner
02b51bcd37 Fix formatting of applies in backpassing 2021-11-27 06:15:48 -08:00
Joshua Warner
e9d22699ed Make sure unary operators around function calls get parens 2021-11-26 20:01:45 -08:00
Joshua Warner
32a8222a37 Add test for formatting package type in TypeAnnotation::Apply 2021-11-26 13:58:17 -08:00
Joshua Warner
f25323e8a7 Implement platform header formatting 2021-11-25 08:19:31 -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
Chadtech
5e2decf89a Binops with parentheses keep their parentheses 2021-10-16 18:01:13 -04:00
Chadtech
56c36c51d7 Commented in many tests which apparently did not work in the past 2021-10-16 13:44:14 -04:00
Chadtech
2ca9dad156 Do not add parens around exprs if they are not needed in formatting 2021-10-16 13:30:32 -04:00
Anton-4
314503cf7f fixed typos, added typos checking to CI 2021-06-05 20:02:54 +02:00
Folkert
2a0c5c669b fiddling with the when parser 2021-03-24 22:55:01 +01:00
Folkert
cba55734cb clean up helpers 2021-03-12 03:41:01 +01:00
Folkert
4e4854ceaa remove unneeded argument 2021-03-12 02:48:07 +01:00
Folkert
3e554cb21f cleanup 2021-03-11 21:21:00 +01:00
Folkert
8ee99fa6be fix up tests 2021-03-10 12:03:33 +01:00
Folkert
0ad975113c fix Bag import in tests 2021-02-08 23:40:50 +01:00
Folkert
ca04411523 fix tests/more uniq removal 2021-02-07 22:50:33 +01:00
Folkert
d211ca7e61 WIP 2021-02-03 20:21:12 +01:00
Folkert
7b4378219e defer empty record issues 2021-02-02 22:27:14 +01:00
Folkert
5ce8e3a9d6 make tests compile 2021-02-02 22:09:29 +01:00
rvcas
27cfd4d7ad more test fixes 2021-01-04 15:18:49 -05:00
Sébastien Besnier
69c38e5bf7 add some commented tests -- it doesn't involve trialing commas too much... 2020-12-28 19:12:37 +01:00