Skip to content

Commit 1d754cf

Browse files
committed
make the get_syntax_test_assertions method public
this will allow other functionality to be developed that can use the same syntax test implementation and show the test results in a more friendly manner etc.
1 parent ab20070 commit 1d754cf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/syntax_tests.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use parsing::{ScopeStack, ParseState, SyntaxReference, SyntaxSet, Scope};
55
//use std::io::Write;
66
use std::str::FromStr;
77
use util::debug_print_ops;
8-
use easy::{ScopeRegionIterator};
8+
use easy::ScopeRegionIterator;
9+
use highlighting::ScopeSelectors;
910

1011
#[derive(Clone, Copy)]
1112
pub struct SyntaxTestOutputOptions {
@@ -22,10 +23,8 @@ pub enum SyntaxTestFileResult {
2223
Success(usize),
2324
}
2425

25-
use highlighting::ScopeSelectors;
26-
2726
#[derive(Debug)]
28-
struct SyntaxTestAssertionRange {
27+
pub struct SyntaxTestAssertionRange {
2928
test_line_offset: usize,
3029
line_number: usize,
3130
begin_char: usize,
@@ -34,7 +33,7 @@ struct SyntaxTestAssertionRange {
3433
scope_selector_text: String,
3534
}
3635

37-
fn get_syntax_test_assertions(token_start: &str, token_end: Option<&str>, text: &str) -> Vec<SyntaxTestAssertionRange> {
36+
pub fn get_syntax_test_assertions(token_start: &str, token_end: Option<&str>, text: &str) -> Vec<SyntaxTestAssertionRange> {
3837
let mut assertions = Vec::new();
3938
let mut test_line_offset = 0;
4039
let mut test_line_len = 0;

0 commit comments

Comments
 (0)