From 5ade8dc36a6f5779a556fa77c8a650551445b245 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 15 Sep 2016 16:07:00 -0700 Subject: [PATCH] Ignore test commands in parse_functions(). No point in returning a syntax error if the file contains test commands. --- src/libreader/parser.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libreader/parser.rs b/src/libreader/parser.rs index 4a10f1cec7..63a635b3f7 100644 --- a/src/libreader/parser.rs +++ b/src/libreader/parser.rs @@ -28,9 +28,7 @@ pub use lexer::Location; /// /// Any test commands or ISA declarations are ignored. pub fn parse_functions(text: &str) -> Result> { - Parser::new(text) - .parse_function_list() - .map(|list| list.into_iter().map(|(func, _)| func).collect()) + parse_test(text).map(|file| file.functions.into_iter().map(|(func, _)| func).collect()) } /// Parse the entire `text` as a test case file.