Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Update for structured errors rust-lang/rust#30542 #26

Merged
merged 2 commits into from
Jan 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quasi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi"
version = "0.3.11"
version = "0.3.12"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand Down
11 changes: 10 additions & 1 deletion quasi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,20 @@ impl<'a> ExtParseUtils for ExtCtxt<'a> {
}
}

// A variant of 'try!' that panics on an Err. This is used as a crutch on the
// way towards a non-panic!-prone parser. It should be used for fatal parsing
// errors; eventually we plan to convert all code using panictry to just use
// normal try.
macro_rules! panictry {
($e:expr) => ({
use std::result::Result::{Ok, Err};
use syntax::errors::FatalError;
match $e {
Ok(e) => e,
Err(err) => panic!(err)
Err(mut e) => {
e.emit();
panic!(FatalError);
}
}
})
}
Expand Down
6 changes: 3 additions & 3 deletions quasi_codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_codegen"
version = "0.3.11"
version = "0.3.12"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -12,5 +12,5 @@ with-syntex = ["syntex", "syntex_syntax", "aster/with-syntex"]

[dependencies]
aster = { version = "^0.9.2", default-features = false }
syntex = { version = "^0.24.0", optional = true }
syntex_syntax = { version = "^0.24.0", optional = true }
syntex = { version = "^0.25.0", optional = true }
syntex_syntax = { version = "^0.25.0", optional = true }
2 changes: 1 addition & 1 deletion quasi_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_macros"
version = "0.3.11"
version = "0.3.12"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand Down
6 changes: 3 additions & 3 deletions quasi_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ build = "build.rs"

[build-dependencies]
quasi_codegen = { version = "*", path = "../quasi_codegen" }
syntex = { version = "^0.24.0" }
syntex = { version = "^0.25.0" }

[dev-dependencies]
aster = { version = "^0.9.2", features = ["with-syntex"] }
quasi = { version = "*", path = "../quasi", features = ["with-syntex"] }
syntex = { version = "^0.24.0" }
syntex_syntax = { version = "^0.24.0" }
syntex = { version = "^0.25.0" }
syntex_syntax = { version = "^0.25.0" }