From c75729c0af8daf6c4e2300d453508b2e5c4d3930 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Sun, 21 Oct 2018 12:06:25 +0300 Subject: [PATCH] add doc comment for get_syntax_test_assertions --- src/syntax_tests.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/syntax_tests.rs b/src/syntax_tests.rs index a47e0460..a6ff2ce2 100644 --- a/src/syntax_tests.rs +++ b/src/syntax_tests.rs @@ -33,6 +33,10 @@ pub struct SyntaxTestAssertionRange { scope_selector_text: String, } +/// Given a start token, option end token and text, parse the syntax tests in the text +/// that follow the format described at http://www.sublimetext.com/docs/3/syntax.html#testing +/// and return the scope selector assertions found, so that when the text is parsed, +/// the assertions can be checked pub fn get_syntax_test_assertions(token_start: &str, token_end: Option<&str>, text: &str) -> Vec { let mut assertions = Vec::new(); let mut test_line_offset = 0;