aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-07-30 13:32:19 +0100
committerAleksey Kladov <[email protected]>2018-07-30 13:32:19 +0100
commitd39198490f878a9ae395af1cf923fb7375de4548 (patch)
tree5e8d63e20abc8c293e6ba80f0391f9119989aa35 /src
parent333e140a50658151002c9287aa68855358bedd56 (diff)
fn ret type
Diffstat (limited to 'src')
-rw-r--r--src/parser/grammar/items/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser/grammar/items/mod.rs b/src/parser/grammar/items/mod.rs
index 5d8d57a80..d059833a0 100644
--- a/src/parser/grammar/items/mod.rs
+++ b/src/parser/grammar/items/mod.rs
@@ -206,6 +206,7 @@ fn extern_block(p: &mut Parser) {
206 p.expect(R_CURLY); 206 p.expect(R_CURLY);
207} 207}
208 208
209
209fn fn_item(p: &mut Parser) { 210fn fn_item(p: &mut Parser) {
210 assert!(p.at(FN_KW)); 211 assert!(p.at(FN_KW));
211 p.bump(); 212 p.bump();
@@ -216,7 +217,10 @@ fn fn_item(p: &mut Parser) {
216 } else { 217 } else {
217 p.error("expected function arguments"); 218 p.error("expected function arguments");
218 } 219 }
219 220 // test fn_item_ret_type
221 // fn foo() {}
222 // fn bar() -> () {}
223 fn_ret_type(p);
220 block(p); 224 block(p);
221 225
222 fn block(p: &mut Parser) { 226 fn block(p: &mut Parser) {