about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2011-07-03 10:39:07 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2011-07-03 11:51:47 -0700
commit046c25dbc0c11dcc467c4ff22b8bfbd853976b5b (patch)
tree1cf826ddaeb78e4dae4309ac143ba68a9db9bcf9 /src/rt/rust_kernel.cpp
parent6369807ffedbe3f8fbfcef3febc5741dcf19cb43 (diff)
downloadrust-046c25dbc0c11dcc467c4ff22b8bfbd853976b5b.tar.gz
rust-046c25dbc0c11dcc467c4ff22b8bfbd853976b5b.zip
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.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions