Fix indentation of pipelines.
This commit is contained in:
parent
6ba74125c7
commit
37627e3527
|
@ -37,6 +37,7 @@
|
||||||
- **aiken-lang**: allow implicitly discarded values when right-hand side unified with `Void`. @KtorZ
|
- **aiken-lang**: allow implicitly discarded values when right-hand side unified with `Void`. @KtorZ
|
||||||
- **aiken-lang**: allow zero arg mutually recursive functions. @Microproofs
|
- **aiken-lang**: allow zero arg mutually recursive functions. @Microproofs
|
||||||
- **aiken-lang**: function aliases now resolved to the module and function name in codegen. @Microproofs
|
- **aiken-lang**: function aliases now resolved to the module and function name in codegen. @Microproofs
|
||||||
|
- **aiken-lang**: fix indentation of pipelines to remain a multiple of the base indent increment. @KtorZ
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -1244,7 +1244,7 @@ impl<'comments> Formatter<'comments> {
|
||||||
|
|
||||||
let expr = self
|
let expr = self
|
||||||
.operator_side(doc, 4, expr.binop_precedence())
|
.operator_side(doc, 4, expr.binop_precedence())
|
||||||
.nest(2 * INDENT + 1);
|
.nest(2 * INDENT);
|
||||||
|
|
||||||
match printed_comments(comments, true) {
|
match printed_comments(comments, true) {
|
||||||
None => {
|
None => {
|
||||||
|
@ -1842,11 +1842,7 @@ impl<'a> Documentable<'a> for &'a ArgName {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pub_(public: bool) -> Document<'static> {
|
fn pub_(public: bool) -> Document<'static> {
|
||||||
if public {
|
if public { "pub ".to_doc() } else { nil() }
|
||||||
"pub ".to_doc()
|
|
||||||
} else {
|
|
||||||
nil()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Documentable<'a> for &'a UnqualifiedImport {
|
impl<'a> Documentable<'a> for &'a UnqualifiedImport {
|
||||||
|
|
|
@ -10,4 +10,3 @@ fn foo() {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ test expect_ford1() {
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
expect Ford { owner, wheels, truck_bed_limit, .. }: Car = initial_car
|
expect Ford { owner, wheels, truck_bed_limit, .. }: Car = initial_car
|
||||||
owner == #"" && wheels == 4 && truck_bed_limit == 10000
|
owner == #"" && ( wheels == 4 && truck_bed_limit == 10000 )
|
||||||
}
|
}
|
||||||
|
|
||||||
test expect_ford2() {
|
test expect_ford2() {
|
||||||
|
@ -42,14 +42,14 @@ test expect_ford2() {
|
||||||
car_doors: [],
|
car_doors: [],
|
||||||
}
|
}
|
||||||
expect Ford { owner, wheels, remote_connect, .. } = initial_car
|
expect Ford { owner, wheels, remote_connect, .. } = initial_car
|
||||||
owner == #"2222222222" && wheels == 6 && remote_connect == #""
|
owner == #"2222222222" && ( wheels == 6 && remote_connect == #"" )
|
||||||
}
|
}
|
||||||
|
|
||||||
test expect_list1() {
|
test expect_list1() {
|
||||||
let initial_car =
|
let initial_car =
|
||||||
[5, 6, 7]
|
[5, 6, 7]
|
||||||
expect [a, b, c] = initial_car
|
expect [a, b, c] = initial_car
|
||||||
a == 5 && b == 6 && c == 7
|
a == 5 && ( b == 6 && c == 7 )
|
||||||
}
|
}
|
||||||
|
|
||||||
test expect_list2() {
|
test expect_list2() {
|
||||||
|
|
|
@ -322,7 +322,7 @@ test get_proof_4() {
|
||||||
let h1: ByteArray = get_proof_item_value(p1)
|
let h1: ByteArray = get_proof_item_value(p1)
|
||||||
let h2: ByteArray = get_proof_item_value(p2)
|
let h2: ByteArray = get_proof_item_value(p2)
|
||||||
|
|
||||||
size_match && h1 == hash_fn(cat) && h2 == right_node_hash
|
size_match && ( h1 == hash_fn(cat) && h2 == right_node_hash )
|
||||||
}
|
}
|
||||||
|
|
||||||
fn do_from_list(
|
fn do_from_list(
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
fn label(str: String) -> Void {
|
fn label(str: String) -> Void {
|
||||||
trace str Void
|
trace str
|
||||||
|
Void
|
||||||
}
|
}
|
||||||
|
|
||||||
test foo() {
|
test foo() {
|
||||||
|
|
Loading…
Reference in New Issue