summaryrefslogtreecommitdiff
path: root/src/func.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-02-04 11:22:00 +0100
committerLaurenz <laurmaedje@gmail.com>2020-02-04 11:22:00 +0100
commit5c11aa72239ecbdd9577f027bdc7e9468d68414e (patch)
tree66d846fb58f38e564eca385a6f86ee8154c503ce /src/func.rs
parentf655656fb8cb6135b26e7960ce0b7adf96d6f567 (diff)
Adapt for tonty and fix a few bugs 🚧
Diffstat (limited to 'src/func.rs')
-rw-r--r--src/func.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/func.rs b/src/func.rs
index 63d7e8ef..590d9ed3 100644
--- a/src/func.rs
+++ b/src/func.rs
@@ -198,38 +198,3 @@ macro_rules! body {
}
};
}
-
-/// Construct an error with formatted message and optionally severity and / or
-/// span.
-///
-/// # Examples
-/// ```
-/// # use typstc::err;
-/// # use typstc::syntax::span::Span;
-/// # let span = Span::ZERO;
-/// # let value = 0;
-///
-/// // With span and default severity `Error`.
-/// err!(span; "the wrong {}", value);
-///
-/// // With no span and severity `Warning`.
-/// err!(@Warning: span; "non-fatal!");
-///
-/// // Without span and default severity.
-/// err!("no spans here ...");
-/// ```
-#[macro_export]
-macro_rules! err {
- (@$severity:ident: $span:expr; $($args:tt)*) => {
- $crate::syntax::span::Spanned { v: err!(@Error: $($args)*), span: $span }
- };
-
- (@$severity:ident: $($args:tt)*) => {
- $crate::error::Error {
- message: format!($($args)*),
- severity: $crate::error::Severity::$severity,
- }
- };
-
- ($($tts:tt)*) => { err!(@Error: $($tts)*) };
-}