MCPcopy Create free account
hub / github.com/denoland/rust-urlpattern / process_tokenizing_error

Method process_tokenizing_error

src/tokenizer.rs:99–115  ·  view source on GitHub ↗

Ref: https://wicg.github.io/urlpattern/#process-a-tokenizing-error

(
    &mut self,
    next_pos: usize,
    value_pos: usize,
    error: TokenizerError,
  )

Source from the content-addressed store, hash-verified

97
98 // Ref: https://wicg.github.io/urlpattern/#process-a-tokenizing-error
99 fn process_tokenizing_error(
100 &mut self,
101 next_pos: usize,
102 value_pos: usize,
103 error: TokenizerError,
104 ) -> Result<(), Error> {
105 if self.policy == TokenizePolicy::Strict {
106 Err(Error::Tokenizer(error, value_pos))
107 } else {
108 self.add_token_with_default_len(
109 TokenType::InvalidChar,
110 next_pos,
111 value_pos,
112 );
113 Ok(())
114 }
115 }
116
117 // Ref: https://wicg.github.io/urlpattern/#seek-and-get-the-next-code-point
118 #[inline]

Callers 1

tokenizeFunction · 0.80

Calls 2

TokenizerClass · 0.85

Tested by

no test coverage detected