Skip to content

Commit

Permalink
add some TODO idea comments for future reference
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall committed Mar 12, 2017
1 parent d66fc3b commit d2bc03a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/syntest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn get_line_assertion_details<'a>(testtoken_start: &str, testtoken_end: Option<&
fn process_assertions(assertion: &AssertionRange, test_against_line_scopes: &Vec<ScopedText>) -> Vec<RangeTestResult> {
let selector = ScopeSelectors::from_str(assertion.scope_selector_text).unwrap();
// find the scope at the specified start column, and start matching the selector through the rest of the tokens on the line from there until the end column is reached
// TODO: don't ignore assertions after the newline
// TODO: don't ignore assertions after the newline, they should be treated as though they are asserting against the newline
let mut results = Vec::new();
for scoped_text in test_against_line_scopes.iter().skip_while(|s|s.char_start + s.text_len <= assertion.begin_char).take_while(|s|s.char_start < assertion.end_char) {
let match_value = selector.does_match(scoped_text.scope.as_slice());
Expand Down Expand Up @@ -183,6 +183,7 @@ fn test_file(ss: &SyntaxSet, path: &Path, parse_test_lines: bool) -> Result<Synt
scope: stack.as_slice().to_vec()
}
);
// TODO: warn when there are duplicate adjacent (non-meta?) scopes, as it is almost always undesired
col += len;
}
}
Expand Down

0 comments on commit d2bc03a

Please sign in to comment.