raleng
1c8bc7d969
Fix formatting block string containing quotes
...
Single-line block strings are parsed as PlainLines. When the string
contains quotes, this leads to invalid formatted strings. This commit
special cases strings containing quotes the same as strings containing
newlines and formats them to multiple lines using triple-quotes.
2022-08-26 11:36:54 +02:00
raleng
4991adb05b
Fix multiline string formatting
...
This change adds the proper indentation when formatting multiline
strings to not end up with invalid code. This also make sure that
multiline strings are always formatted using multiple lines, regardless
of the string literal itself contains a newline.
2022-08-26 11:13:37 +02:00
raleng
1b2952bc70
Fix invalid multiline string output in REPL
...
If a PlainLine string contains a newline character, the REPL will print
the string using a triple-quoted block string.
2022-08-23 11:26:48 +02:00
Richard Feldman
862b58b8f9
Fix expect
formatting in expressions
2022-08-04 23:14:19 -04:00
Richard Feldman
47dd3743e7
Revert "Don't keep comments right after the ->"
...
This reverts commit 326337ae00624e7f326ce92aa473a48283bcbf98.
2022-07-13 23:16:08 -04:00
Richard Feldman
18be76ea43
Don't keep comments right after the ->
...
(at least not when the branch is a multiline expr!)
2022-07-13 23:16:08 -04:00
Richard Feldman
d3f5117d76
Revert "Simplify some branch formatting logic"
...
This reverts commit 597055c1e580363f8645d3f9cc74134bd1e07bbe.
2022-07-13 23:16:08 -04:00
Richard Feldman
b51c8b0ba4
Simplify some branch formatting logic
2022-07-13 23:16:08 -04:00
Richard Feldman
9e19baef59
Don't indent next expr after multiline binop
2022-07-13 22:05:04 -04:00
Richard Feldman
28e0a9e382
Don't indent multiple patterns
2022-07-13 21:50:30 -04:00
Richard Feldman
f066ee12dc
Don't indent multiline infix operators
2022-07-13 21:40:28 -04:00
Richard Feldman
b08d6a0446
Fix edge case with comments and branches
2022-07-11 13:14:35 -04:00
Richard Feldman
4530d9ebd3
Format multiline branches with newlines before
2022-07-11 13:12:34 -04:00
Richard Feldman
42a110dc6b
clippy
2022-07-06 16:51:25 -04:00
Richard Feldman
82c81a7039
Allow comments after the -> in a when
2022-07-06 16:48:28 -04:00
Richard Feldman
15932d7d47
Fix comments in when
branches
2022-07-06 16:42:54 -04:00
Richard Feldman
18edf5f0d6
Fix comments in when
conditionals
2022-07-06 16:42:53 -04:00
Richard Feldman
f01d6a55f7
Fix multiline_binop_conditional_with_comments
2022-07-06 16:42:53 -04:00
Richard Feldman
da8a1fb81f
Fix starts_with_newline logic
2022-07-06 16:42:53 -04:00
Richard Feldman
824de8bcc9
Rename with_inline_comment to has_line_comment_before
2022-07-06 16:42:53 -04:00
Richard Feldman
7eba683355
s/bin_op/binop/g
...
This is the term we use elsewhere in the compiler
2022-07-06 16:42:53 -04:00
Richard Feldman
ca0b40cd9d
Use a pattern match over ==
2022-07-06 15:10:16 -04:00
Richard Feldman
267bae5dec
Don't add more newlines than necessary
2022-07-06 15:10:16 -04:00
Richard Feldman
cab096b4e1
Don't print extra newline in multiline |
patterns
2022-07-03 22:43:21 -04:00
Richard Feldman
d1ba89f97f
Fix an extraneous newline in formatting
2022-07-03 22:38:26 -04:00
Richard Feldman
244a501433
Indent for multiline | patterns
2022-07-03 22:17:13 -04:00
Anton-4
eee85fa45d
moved all crates into seperate folder + related path fixes
2022-07-01 17:37:43 +02:00