Skip to content

@bors-servo bors-servo tagged this Aug 9, 2017 · 196 commits to master since this tag

Count line-numbers during tokenization

Before this PR, the `source_location` and `current_source_location` iterated (again) through input bytes separately from tokenization in order to count newline characters and determine the line number of some piece of a stylesheet.

This PR makes this counting happen during tokenization instead, where we already have a pass looking at every bytes.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/177)
<!-- Reviewable:end -->
Assets 2
You can’t perform that action at this time.