From 3ff5440a503f090032136c37c3d44375d6107db1 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 19 Apr 2019 02:47:29 +0800 Subject: Add MacroItems and MacroStmts in grammer.ron --- crates/ra_parser/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_parser/src/lib.rs') diff --git a/crates/ra_parser/src/lib.rs b/crates/ra_parser/src/lib.rs index 11b5b9a75..d6bcc4d8c 100644 --- a/crates/ra_parser/src/lib.rs +++ b/crates/ra_parser/src/lib.rs @@ -98,6 +98,10 @@ pub fn parse_item(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink) parse_from_tokens(token_source, tree_sink, grammar::item); } +pub fn parse_macro_items(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink) { + parse_from_tokens(token_source, tree_sink, grammar::macro_items); +} + /// A parsing function for a specific braced-block. pub struct Reparser(fn(&mut parser::Parser)); -- cgit v1.2.3 From c0f19d70056fada5f381019694d893e0ffe8360a Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 19 Apr 2019 03:49:56 +0800 Subject: Add expr, pat, ty and macro_stmts --- crates/ra_parser/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_parser/src/lib.rs') diff --git a/crates/ra_parser/src/lib.rs b/crates/ra_parser/src/lib.rs index d6bcc4d8c..0ea942b6e 100644 --- a/crates/ra_parser/src/lib.rs +++ b/crates/ra_parser/src/lib.rs @@ -102,6 +102,10 @@ pub fn parse_macro_items(token_source: &dyn TokenSource, tree_sink: &mut dyn Tre parse_from_tokens(token_source, tree_sink, grammar::macro_items); } +pub fn parse_macro_stmts(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink) { + parse_from_tokens(token_source, tree_sink, grammar::macro_stmts); +} + /// A parsing function for a specific braced-block. pub struct Reparser(fn(&mut parser::Parser)); -- cgit v1.2.3