Struct rslint_regex::Parser [−][src]
pub struct Parser<'pat> {
pub pattern: &'pat str,
pub file_id: usize,
pub ecma_version: EcmaVersion,
// some fields omitted
}
Expand description
The actual parser that is responsible for parsing regex.
Fields
pattern: &'pat str
file_id: usize
ecma_version: EcmaVersion
Implementations
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