aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-02-10 14:48:22 +0100
committerPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-03-30 13:52:28 +0200
commit4f6d36157d123e6960f4256243480e5d53b7ba72 (patch)
tree722f7733fe137c319bc648f7b976aa8e88c2da46
parent400e08b2dadd81b6599f079e45c93e5c6e685626 (diff)
downloadgcc-4f6d36157d123e6960f4256243480e5d53b7ba72.zip
gcc-4f6d36157d123e6960f4256243480e5d53b7ba72.tar.gz
gcc-4f6d36157d123e6960f4256243480e5d53b7ba72.tar.bz2
libproc_macro: Add LexError type interface
Add LexError type rust interface in libproc_macro. ChangeLog: * librust/proc_macro/rust/lib.rs: Add LexError. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
-rw-r--r--librust/proc_macro/rust/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/librust/proc_macro/rust/lib.rs b/librust/proc_macro/rust/lib.rs
index 83d8448..c28ffeb 100644
--- a/librust/proc_macro/rust/lib.rs
+++ b/librust/proc_macro/rust/lib.rs
@@ -1,3 +1,4 @@
+use std::error;
use std::fmt;
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
@@ -92,3 +93,14 @@ impl fmt::Debug for Ident {
todo!("Implement this function")
}
}
+
+#[derive(Debug)]
+pub struct LexError;
+
+impl fmt::Display for LexError {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ todo!("Implement this function")
+ }
+}
+
+impl error::Error for LexError {}