File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,18 @@ pub enum SyntaxTestFileResult {
2525
2626#[ derive( Debug ) ]
2727pub struct SyntaxTestAssertionRange {
28- test_line_offset : usize ,
29- line_number : usize ,
30- begin_char : usize ,
31- end_char : usize ,
32- scope_selector : ScopeSelectors ,
33- scope_selector_text : String ,
28+ pub test_line_offset : usize ,
29+ pub line_number : usize ,
30+ pub begin_char : usize ,
31+ pub end_char : usize ,
32+ pub scope_selector : ScopeSelectors ,
33+ pub scope_selector_text : String ,
3434}
3535
36+ /// Given a start token, option end token and text, parse the syntax tests in the text
37+ /// that follow the format described at http://www.sublimetext.com/docs/3/syntax.html#testing
38+ /// and return the scope selector assertions found, so that when the text is parsed,
39+ /// the assertions can be checked
3640pub fn get_syntax_test_assertions ( token_start : & str , token_end : Option < & str > , text : & str ) -> Vec < SyntaxTestAssertionRange > {
3741 let mut assertions = Vec :: new ( ) ;
3842 let mut test_line_offset = 0 ;
You can’t perform that action at this time.
0 commit comments