granit-parser
Advanced tools
| { | ||
| "git": { | ||
| "sha1": "f0b7631a54dcf1ec10ad52b4ac7fb87ee8583bf4" | ||
| "sha1": "ddae31b0d4a94cef687b89808c552659c3a93b0e" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
+1
-1
@@ -139,3 +139,3 @@ # This file is automatically @generated by Cargo. | ||
| name = "granit-parser" | ||
| version = "1.0.0-rc.1" | ||
| version = "1.0.0-rc.2" | ||
| dependencies = [ | ||
@@ -142,0 +142,0 @@ "arraydeque", |
+1
-1
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "granit-parser" | ||
| version = "1.0.0-rc.1" | ||
| version = "1.0.0-rc.2" | ||
| authors = [ | ||
@@ -19,0 +19,0 @@ "Ethiraric <ethiraric@gmail.com>", |
+4
-0
@@ -44,2 +44,6 @@ # Changelog | ||
| `ReplayParser` directly iterable. | ||
| - Added `#[must_use]` to parser, scanner, and buffered-input constructors, scanner state accessors, | ||
| and the value-returning `Input` predicate helpers. | ||
| - Added `#[track_caller]` to caller-precondition checks so panic locations point to the invalid | ||
| call. | ||
@@ -46,0 +50,0 @@ **Features and Fixes**: |
@@ -68,2 +68,6 @@ //! Holds functions to determine if a character belongs to a specific character set. | ||
| /// Convert the hexadecimal digit to an integer. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if `c` is not an ASCII hexadecimal digit. | ||
| #[track_caller] | ||
| #[inline] | ||
@@ -70,0 +74,0 @@ #[must_use] |
+50
-0
@@ -34,2 +34,7 @@ //! Utilities to create a source of input to the parser. | ||
| /// Returns `None` if the input does not support zero-copy slicing. | ||
| /// | ||
| /// # Panics | ||
| /// Implementations may panic in debug builds if `start` is greater than `end` or `end` is past | ||
| /// the end of the underlying source. | ||
| #[track_caller] | ||
| #[must_use] | ||
@@ -177,2 +182,7 @@ fn slice_borrowed(&self, start: usize, end: usize) -> Option<&'a str>; | ||
| /// here. | ||
| /// | ||
| /// # Panics | ||
| /// Implementations may panic in debug builds if `start` is greater than `end` or `end` is past | ||
| /// the end of the underlying source. | ||
| #[track_caller] | ||
| #[inline] | ||
@@ -244,2 +254,6 @@ #[must_use] | ||
| /// through [`Input::lookahead`]. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if the active lookahead window contains fewer than 2 characters. | ||
| #[track_caller] | ||
| #[inline] | ||
@@ -256,2 +270,6 @@ #[must_use] | ||
| /// through [`Input::lookahead`]. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if the active lookahead window contains fewer than 3 characters. | ||
| #[track_caller] | ||
| #[inline] | ||
@@ -268,2 +286,6 @@ #[must_use] | ||
| /// through [`Input::lookahead`]. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if the active lookahead window contains fewer than 4 characters. | ||
| #[track_caller] | ||
| #[inline] | ||
@@ -281,2 +303,6 @@ #[must_use] | ||
| /// through [`Input::lookahead`]. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if the active lookahead window contains fewer than 4 characters. | ||
| #[track_caller] | ||
| #[inline] | ||
@@ -293,2 +319,6 @@ #[must_use] | ||
| /// through [`Input::lookahead`]. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if the active lookahead window contains fewer than 4 characters. | ||
| #[track_caller] | ||
| #[inline] | ||
@@ -315,3 +345,9 @@ #[must_use] | ||
| /// consumed prior to reaching the `#`. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if `skip_tabs` is [`SkipTabs::Result`], which is an output-only variant. | ||
| #[track_caller] | ||
| fn skip_ws_to_eol(&mut self, skip_tabs: SkipTabs) -> (usize, Result<SkipTabs, ErrorKind>) { | ||
| assert!(!matches!(skip_tabs, SkipTabs::Result(..))); | ||
| let mut encountered_tab = false; | ||
@@ -361,2 +397,6 @@ let mut has_yaml_ws = false; | ||
| /// tabs and valid YAML whitespace (` `) were encountered. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if `skip_tabs` is [`SkipTabs::Result`], which is an output-only variant. | ||
| #[track_caller] | ||
| fn skip_ws_to_eol_blanks(&mut self, skip_tabs: SkipTabs) -> (usize, SkipTabs) { | ||
@@ -396,2 +436,3 @@ assert!(!matches!(skip_tabs, SkipTabs::Result(..))); | ||
| #[inline(always)] | ||
| #[must_use] | ||
| fn next_can_be_plain_scalar(&self, in_flow: bool) -> bool { | ||
@@ -418,2 +459,3 @@ let nc = self.peek_nth(1); | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_blank_or_break(&self) -> bool { | ||
@@ -434,2 +476,3 @@ is_blank(self.peek()) || is_break(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_blank_or_breakz(&self) -> bool { | ||
@@ -449,2 +492,3 @@ is_blank(self.peek()) || is_breakz(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_blank(&self) -> bool { | ||
@@ -464,2 +508,3 @@ is_blank(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_break(&self) -> bool { | ||
@@ -479,2 +524,3 @@ is_break(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_breakz(&self) -> bool { | ||
@@ -494,2 +540,3 @@ is_breakz(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_z(&self) -> bool { | ||
@@ -509,2 +556,3 @@ is_z(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_flow(&self) -> bool { | ||
@@ -524,2 +572,3 @@ is_flow(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_digit(&self) -> bool { | ||
@@ -539,2 +588,3 @@ is_digit(self.peek()) | ||
| #[inline] | ||
| #[must_use] | ||
| fn next_is_alpha(&self) -> bool { | ||
@@ -541,0 +591,0 @@ is_alpha(self.peek()) |
@@ -42,2 +42,3 @@ use crate::char_traits::is_breakz; | ||
| /// Create a new [`BufferedInput`] over the given character iterator. | ||
| #[must_use] | ||
| pub fn new(input: T) -> Self { | ||
@@ -253,2 +254,3 @@ Self { | ||
| /// Create a buffered input over a fallible character iterator. | ||
| #[must_use] | ||
| pub fn new(input: T) -> Self { | ||
@@ -255,0 +257,0 @@ Self { |
@@ -408,2 +408,7 @@ use crate::{ | ||
| /// Pop the current parser and propagate its anchor offset to its parent. | ||
| /// | ||
| /// # Panics | ||
| /// Panics if the parser stack is empty. | ||
| #[track_caller] | ||
| fn pop_parser_and_propagate_anchor_offset(&mut self) { | ||
@@ -410,0 +415,0 @@ let popped = self.parsers.pop().unwrap(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display