More fixes towards tabulations.
This commit is contained in:
parent
e1ae3bd5b2
commit
29b513bea3
2 changed files with 2 additions and 7 deletions
|
@ -1585,7 +1585,7 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
||||||
let mut leading_break = String::new();
|
let mut leading_break = String::new();
|
||||||
let mut trailing_breaks = String::new();
|
let mut trailing_breaks = String::new();
|
||||||
let mut whitespaces = String::new();
|
let mut whitespaces = String::new();
|
||||||
let mut leading_blanks = false;
|
let mut leading_blanks = true;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
/* Check for a document indicator. */
|
/* Check for a document indicator. */
|
||||||
|
@ -1647,9 +1647,8 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
||||||
if !(is_blank(self.ch()) || is_break(self.ch())) {
|
if !(is_blank(self.ch()) || is_break(self.ch())) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
self.lookahead(1);
|
|
||||||
|
|
||||||
while is_blank(self.ch()) || is_break(self.ch()) {
|
while is_blank(self.look_ch()) || is_break(self.ch()) {
|
||||||
if is_blank(self.ch()) {
|
if is_blank(self.ch()) {
|
||||||
if leading_blanks && (self.mark.col as isize) < indent && self.ch() == '\t' {
|
if leading_blanks && (self.mark.col as isize) < indent && self.ch() == '\t' {
|
||||||
return Err(ScanError::new(
|
return Err(ScanError::new(
|
||||||
|
@ -1673,7 +1672,6 @@ impl<T: Iterator<Item = char>> Scanner<T> {
|
||||||
leading_blanks = true;
|
leading_blanks = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.lookahead(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check indentation level
|
// check indentation level
|
||||||
|
|
|
@ -299,16 +299,13 @@ fn expected_events(expected_tree: &str) -> Vec<String> {
|
||||||
static EXPECTED_FAILURES: &[&str] = &[
|
static EXPECTED_FAILURES: &[&str] = &[
|
||||||
// These seem to be plain bugs
|
// These seem to be plain bugs
|
||||||
// TAB as start of plain scalar instead of whitespace
|
// TAB as start of plain scalar instead of whitespace
|
||||||
"6BCT",
|
|
||||||
"6CA3",
|
"6CA3",
|
||||||
"A2M4",
|
|
||||||
"DK95-00",
|
"DK95-00",
|
||||||
"Q5MG",
|
"Q5MG",
|
||||||
"Y79Y-06",
|
"Y79Y-06",
|
||||||
"Y79Y-03", // unexpected pass
|
"Y79Y-03", // unexpected pass
|
||||||
"Y79Y-04", // unexpected pass
|
"Y79Y-04", // unexpected pass
|
||||||
"Y79Y-05", // unexpected pass
|
"Y79Y-05", // unexpected pass
|
||||||
"Y79Y-10",
|
|
||||||
// TABs in whitespace-only lines
|
// TABs in whitespace-only lines
|
||||||
"DK95-03",
|
"DK95-03",
|
||||||
"DK95-04",
|
"DK95-04",
|
||||||
|
|
Loading…
Reference in a new issue