aboutsummaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser')
-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) {