Change the way block calls are parsed, mark them as block-calls.
This makes it possible to omit the semicolon after the block, and will cause the pretty-printer to properly print such calls (if pretty-printing of blocks wasn't so broken). Block calls (with the block outside of the parentheses) can now only occur at statement level, and their value can not be used. When calling a block-style function that returns a useful value, the block must be put insde the parentheses. Issue #1054
This commit is contained in:
parent
0ce40f60e7
commit
7114702496
18 changed files with 56 additions and 46 deletions
|
|
@ -163,7 +163,7 @@ fn is_exported(i: ident, m: _mod) -> bool {
|
|||
}
|
||||
|
||||
pure fn is_call_expr(e: @expr) -> bool {
|
||||
alt e.node { expr_call(_, _) { true } _ { false } }
|
||||
alt e.node { expr_call(_, _, _) { true } _ { false } }
|
||||
}
|
||||
|
||||
fn is_constraint_arg(e: @expr) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue