Skip to content

Commit

Permalink
more nom stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytaph committed Nov 29, 2023
1 parent 8e8919d commit a9f0cda
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 111 deletions.
8 changes: 4 additions & 4 deletions src/css3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ impl CssAst {
let mut idx = 0;
loop {
let t = input[idx].clone();
idx += 1;
match t {
Token::Ident(ref ident) => {
if ident.starts_with(".") {
Expand All @@ -896,9 +897,10 @@ impl CssAst {
})
}
}
_ => continue,
_ => {
continue
},
}
idx += 1;
if t == Token::Whitespace {
continue;
}
Expand All @@ -907,8 +909,6 @@ impl CssAst {
println!("from");
continue;
}


}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/css3/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ impl InputTake for Span<'_> {

fn take_split(&self, count: usize) -> (Self, Self) {
let (left, right) = self.0.split_at(count);
(Span(left), Span(right))
// Yes, other way around :/
(Span(right), Span(left))
}
}

Expand Down
Loading

0 comments on commit a9f0cda

Please sign in to comment.