From 003ea633e9e9fbd3e30aec2c6f33589aa13b000a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 4 Feb 2018 12:28:30 +0300 Subject: Add more inline tests --- src/parser/event_parser/grammar/items/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/parser/event_parser/grammar/items') diff --git a/src/parser/event_parser/grammar/items/mod.rs b/src/parser/event_parser/grammar/items/mod.rs index 5cf2fc39a..6d6fabbd7 100644 --- a/src/parser/event_parser/grammar/items/mod.rs +++ b/src/parser/event_parser/grammar/items/mod.rs @@ -25,6 +25,8 @@ fn item(p: &mut Parser) { use_item::use_item(p); USE_ITEM } + // test extern_crate + // extern crate foo; EXTERN_KW if la == CRATE_KW => { extern_crate_item(p); EXTERN_CRATE_ITEM @@ -32,14 +34,20 @@ fn item(p: &mut Parser) { EXTERN_KW => { abi(p); match p.current() { + // test extern_fn + // extern fn foo() {} FN_KW => { fn_item(p); FN_ITEM } + // test extern_block + // extern {} L_CURLY => { extern_block(p); EXTERN_BLOCK } + // test extern_struct + // extern struct Foo; _ => { item.abandon(p); p.error().message("expected `fn` or `{`").emit(); -- cgit v1.2.3