-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from rusty-ecma/fix/remove-dyn-error
fix: Error type is now Send + Sync
- Loading branch information
Showing
3 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "ressa" | ||
version = "0.9.0-alpha.1" | ||
version = "0.9.0-alpha.2" | ||
authors = ["Robert Masen <[email protected]>"] | ||
repository = "https://github.com/rusty-ecma/RESSA" | ||
description = "An ECMAscript parser" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
use super::{Error, Res}; | ||
use super::Res; | ||
use res_regex::RegexParser; | ||
/// Validate that an already parsed regular expression | ||
/// literal does not contain any illegal constructs | ||
/// like a duplicate flag or invalid class range | ||
pub fn validate_regex<'a>(regex: &'a str) -> Res<()> { | ||
RegexParser::new(®ex) | ||
.map_err(|e| Error::Other(Box::new(e)))? | ||
.validate() | ||
.map_err(|e| Error::Other(Box::new(e)))?; | ||
RegexParser::new(®ex)?.validate()?; | ||
Ok(()) | ||
} |