2019-04-11 15:23:14 -07:00
|
|
|
use crate::common::*;
|
2019-04-11 12:30:29 -07:00
|
|
|
|
2019-04-11 23:58:08 -07:00
|
|
|
#[derive(Debug)]
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) struct Alias<'a> {
|
|
|
|
pub(crate) name: &'a str,
|
|
|
|
pub(crate) target: &'a str,
|
|
|
|
pub(crate) line_number: usize,
|
|
|
|
pub(crate) private: bool,
|
2019-04-11 12:30:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Display for Alias<'a> {
|
2019-04-11 15:23:14 -07:00
|
|
|
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
2019-04-18 11:48:02 -07:00
|
|
|
write!(f, "alias {} := {}", self.name, self.target)
|
2019-04-11 12:30:29 -07:00
|
|
|
}
|
|
|
|
}
|