]> git.lizzy.rs Git - rust.git/commit
Parse nullary ret correctly
authorTim Chevalier <chevalier@alum.wellesley.edu>
Wed, 13 Jul 2011 22:00:59 +0000 (15:00 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Wed, 13 Jul 2011 22:00:59 +0000 (15:00 -0700)
commit5e1a6dac4409ba2f584fb41d0759e6c79ec8a8c4
tree94f411bec7c364cf41e6361e6e93d0df33dd3b49
parent0c913e63d926fc8cf1dd06260546b16f5aa90402
Parse nullary ret correctly

ret is similar to fail: if not followed by an expression, it
should be parsed as a ret without an argument. The old version would
fail if ret was followed by a close paren (for example). Fixed it.

Closes #676.
src/comp/syntax/parse/parser.rs
src/test/run-pass/if-ret.rs [new file with mode: 0644]