rust/src/comp/middle
Tim Chevalier 046c25dbc0 Handle fail as an argument; parse fail expressions unambiguously
An expression like:

foo(1, fail, 2)

was failing to parse, because the parser was interpreting the comma
as the start of an expression that was an argument to fail, rather
than recognizing that the fail here has no arguments

Fixed this by using can_begin_expr to determine whether the next
token after a fail token suggests that this is a nullary fail or a
unary fail.

In addition, when translating calls, check before translating each
argument that the block still isn't terminated. This has the effect
that if an argument list includes fail, the back-end won't keep trying
to generate code for successive arguments and trip the !*terminated
assertion.
2011-07-03 11:51:47 -07:00
..
tstate Allow any string expression to be used with fail. 2011-07-02 00:06:58 -07:00
alias.rs Allow dereferencing of single-variant, single-argument tag values 2011-07-01 17:51:47 +02:00
ast_map.rs Replace common::new_seq_hash with an adapter around std::smallintmap 2011-06-28 19:48:33 -07:00
resolve.rs rustc: Move path_to_str to front::ast 2011-07-01 17:22:18 -07:00
trans.rs Handle fail as an argument; parse fail expressions unambiguously 2011-07-03 11:51:47 -07:00
ty.rs rustc: Move path_to_str to front::ast 2011-07-01 17:22:18 -07:00
typeck.rs Eliminate all direct calls to option::get() from typeck 2011-07-03 02:48:08 -07:00
visit.rs Manipulate contexts correctly in trans_fail_expr 2011-07-03 02:38:11 -07:00
walk.rs Allow any string expression to be used with fail. 2011-07-02 00:06:58 -07:00