Skip to content

Commit

Permalink
add doc comment for get_syntax_test_assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall committed Oct 21, 2018
1 parent 1d754cf commit b39cd4e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/syntax_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ pub enum SyntaxTestFileResult {

#[derive(Debug)]
pub struct SyntaxTestAssertionRange {
test_line_offset: usize,
line_number: usize,
begin_char: usize,
end_char: usize,
scope_selector: ScopeSelectors,
scope_selector_text: String,
pub test_line_offset: usize,
pub line_number: usize,
pub begin_char: usize,
pub end_char: usize,
pub scope_selector: ScopeSelectors,
pub 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<SyntaxTestAssertionRange> {
let mut assertions = Vec::new();
let mut test_line_offset = 0;
Expand Down

0 comments on commit b39cd4e

Please sign in to comment.