summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-12 06:37:59 +0200
committerMartin Fischer <martin@push-f.com>2023-09-28 10:36:08 +0200
commit27e984084317ebbacdaf67823e4ee12a9060d76e (patch)
tree175f796e78d705021253c43feb783c5fc499576e
parente39b3297d81720b60fb4c23eca73c02a13bfc82a (diff)
break!: remove NaiveParser::new_with_spans
The method never really made much sense since you could just as well use NaiveParser::new.
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/naive_parser.rs10
2 files changed, 2 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aab7a86..8f7452f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,8 @@
* Replaced `emit_string` with `emit_char`.
+* `NaiveParser`: Removed `new_with_spans`.
+
### 0.5.1 - 2023-09-03
#### Features
diff --git a/src/naive_parser.rs b/src/naive_parser.rs
index c5e9568..ac82d46 100644
--- a/src/naive_parser.rs
+++ b/src/naive_parser.rs
@@ -40,16 +40,6 @@ impl<R: Reader + Position<O>, O: Offset> NaiveParser<R, O, DefaultEmitter<O>> {
}
}
-impl<R: Reader + Position<usize>> NaiveParser<R, usize, DefaultEmitter<usize>> {
- /// Constructs a new naive parser with source code offsets and spans.
- // TODO: add example for NaiveParser::new_with_spans
- pub fn new_with_spans<'a>(reader: impl IntoReader<'a, Reader = R>) -> Self {
- let mut tokenizer = Tokenizer::new(reader, DefaultEmitter::default());
- tokenizer.enable_naive_state_switching();
- NaiveParser { tokenizer }
- }
-}
-
impl<R: Reader + Position<O>, O: Offset, E: Emitter<O>> NaiveParser<R, O, E> {
/// Constructs a new naive parser with a custom emitter.
// TODO: add example for NaiveParser::new_with_emitter