mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 21:40:58 +00:00
simplify regex expression strings
This commit is contained in:
parent
6ab54c02e2
commit
60afb79cc7
2 changed files with 7 additions and 7 deletions
|
|
@ -149,10 +149,10 @@ lazy_static! {
|
|||
/// inst # instantiate the given generic instance
|
||||
/// ```
|
||||
static ref RE_TYPE_QUERY: Regex =
|
||||
Regex::new(r#"(?P<where>\^+)(?:\{(?P<directives>.*?)\})?"#).unwrap();
|
||||
Regex::new(r"(?P<where>\^+)(?:\{(?P<directives>.*?)\})?").unwrap();
|
||||
|
||||
static ref RE_DIRECTIVE : Regex =
|
||||
Regex::new(r#"(?:-(?P<sub>\d+))|(?P<inst>inst)"#).unwrap();
|
||||
Regex::new(r"(?:-(?P<sub>\d+))|(?P<inst>inst)").unwrap();
|
||||
}
|
||||
|
||||
/// Markers of nested query lines, that should be skipped.
|
||||
|
|
|
|||
|
|
@ -39,23 +39,23 @@ lazy_static! {
|
|||
|
||||
/// # +set <setting>
|
||||
static ref RE_SETTING: Regex =
|
||||
Regex::new(r#"# \+set (?P<setting>.*?)=(?P<value>.*)"#).unwrap();
|
||||
Regex::new(r"# \+set (?P<setting>.*?)=(?P<value>.*)").unwrap();
|
||||
|
||||
/// # +opt can:<opt>
|
||||
static ref RE_OPT_CAN: Regex =
|
||||
Regex::new(r#"# \+opt can:(?P<opt>.*)"#).unwrap();
|
||||
Regex::new(r"# \+opt can:(?P<opt>.*)").unwrap();
|
||||
|
||||
/// # +opt infer:<opt>
|
||||
static ref RE_OPT_INFER: Regex =
|
||||
Regex::new(r#"# \+opt infer:(?P<opt>.*)"#).unwrap();
|
||||
Regex::new(r"# \+opt infer:(?P<opt>.*)").unwrap();
|
||||
|
||||
/// # +opt mono:<opt>
|
||||
static ref RE_OPT_MONO: Regex =
|
||||
Regex::new(r#"# \+opt mono:(?P<opt>.*)"#).unwrap();
|
||||
Regex::new(r"# \+opt mono:(?P<opt>.*)").unwrap();
|
||||
|
||||
/// # +emit:<opt>
|
||||
static ref RE_EMIT: Regex =
|
||||
Regex::new(r#"# \+emit:(?P<opt>.*)"#).unwrap();
|
||||
Regex::new(r"# \+emit:(?P<opt>.*)").unwrap();
|
||||
|
||||
/// ## module <name>
|
||||
static ref RE_MODULE: Regex =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue