summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-10-01 11:05:16 +0200
committerLaurenz <laurmaedje@gmail.com>2020-10-01 11:08:53 +0200
commit16f0bd430e0864a3bbd0139803e476be413cb3cb (patch)
treec7c5f01cb10b0503cbc1c43494bf3b2c6c6ff173 /src/syntax
parentc0998b48022f2dc010106044fdcb4d5f6f2b9d77 (diff)
Rename CharParser to Scanner ✏
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/lines.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/syntax/lines.rs b/src/syntax/lines.rs
index 7f7ee049..6ea223c4 100644
--- a/src/syntax/lines.rs
+++ b/src/syntax/lines.rs
@@ -3,7 +3,7 @@
use std::fmt::{self, Debug, Display, Formatter};
use super::Pos;
-use crate::parse::{is_newline_char, CharParser};
+use crate::parse::{is_newline_char, Scanner};
/// Enables conversion of byte position to locations.
pub struct LineMap<'s> {
@@ -15,11 +15,11 @@ impl<'s> LineMap<'s> {
/// Create a new line map for a source string.
pub fn new(src: &'s str) -> Self {
let mut line_starts = vec![Pos::ZERO];
- let mut p = CharParser::new(src);
+ let mut s = Scanner::new(src);
- while let Some(c) = p.eat_merging_crlf() {
+ while let Some(c) = s.eat_merging_crlf() {
if is_newline_char(c) {
- line_starts.push(p.index().into());
+ line_starts.push(s.index().into());
}
}