Don't even need an outcome
This commit is contained in:
@@ -393,10 +393,10 @@ class Exprs {
|
||||
if(pos == null) pos = e.pos;
|
||||
return
|
||||
switch [e.expr, with.expr] {
|
||||
case [EBlock(e1), EBlock(e2)]: Success(EBlock(e1.concat(e2)).at(pos));
|
||||
case [EBlock(e1), e2]: Success(EBlock(e1.concat([with])).at(pos));
|
||||
case [e1, EBlock(e2)]: Success(EBlock([e].concat(e2)).at(pos));
|
||||
default: Success(EBlock([e, with]).at(pos));
|
||||
case [EBlock(e1), EBlock(e2)]: EBlock(e1.concat(e2)).at(pos);
|
||||
case [EBlock(e1), e2]: EBlock(e1.concat([with])).at(pos);
|
||||
case [e1, EBlock(e2)]: EBlock([e].concat(e2)).at(pos);
|
||||
default: EBlock([e, with]).at(pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -82,9 +82,9 @@ class Exprs extends Base {
|
||||
}
|
||||
|
||||
function testConcat() {
|
||||
exprEq(macro {a; b;}, (macro a).concat(macro b).sure());
|
||||
exprEq(macro {a; b; c;}, (macro {a; b;}).concat(macro c).sure());
|
||||
exprEq(macro {a; b; c;}, (macro a).concat(macro {b; c;}).sure());
|
||||
exprEq(macro {a; b; c; d;}, (macro {a; b;}).concat(macro {c; d;}).sure());
|
||||
exprEq(macro {a; b;}, (macro a).concat(macro b));
|
||||
exprEq(macro {a; b; c;}, (macro {a; b;}).concat(macro c));
|
||||
exprEq(macro {a; b; c;}, (macro a).concat(macro {b; c;}));
|
||||
exprEq(macro {a; b; c; d;}, (macro {a; b;}).concat(macro {c; d;}));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user