046c25dbc0
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.
This is preliminary version of the Rust compiler(s). Source layout: comp/ The self-hosted compiler lib/ The standard library rustllvm/ LLVM support code rt/ The runtime system rt/rust_*.cpp - The majority of the runtime services rt/isaac - The PRNG used for pseudo-random choices in the runtime rt/bigint - The bigint library used for the 'big' type rt/uthash - Small hashtable-and-list library for C, used in runtime rt/{sync,util} - Small utility classes for the runtime. test/ Testsuite test/compile-fail - Tests that should fail to compile test/run-fail - Tests that should compile, run and fail test/run-pass - Tests that should compile, run and succeed test/bench - Benchmarks and miscellanea Please be gentle, it's a work in progress.