Struct rslint_regex::Parser [−][src]
The actual parser that is responsible for parsing regex.
Fields
pattern: &'pat str
file_id: usize
ecma_version: EcmaVersion
Implementations
impl<'pat> Parser<'pat>
[src]
pub fn new(
pattern: &'pat str,
file_id: usize,
offset: usize,
ecma_version: EcmaVersion,
strict: bool
) -> Result<Self>
[src]
pattern: &'pat str,
file_id: usize,
offset: usize,
ecma_version: EcmaVersion,
strict: bool
) -> Result<Self>
Creates a new Parser
from a given full pattern.
The given offset is used to convert the relative position in the pattern
into an absolute position inside a file. The pattern
must be the pattern without
the leading and trailing /
Panics
Panics if there is no leading or trailing /
Returns
Returns a Result
from parsing flags
pub fn new_from_pattern_and_flags(
pattern: &'pat str,
file_id: usize,
offset: usize,
ecma_version: EcmaVersion,
strict: bool,
flags: Flags
) -> Self
[src]
pattern: &'pat str,
file_id: usize,
offset: usize,
ecma_version: EcmaVersion,
strict: bool,
flags: Flags
) -> Self
impl Parser<'_>
[src]
Auto Trait Implementations
impl<'pat> RefUnwindSafe for Parser<'pat>
[src]
impl<'pat> Send for Parser<'pat>
[src]
impl<'pat> Sync for Parser<'pat>
[src]
impl<'pat> Unpin for Parser<'pat>
[src]
impl<'pat> UnwindSafe for Parser<'pat>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,