use crate::nodes::InnerNode;
use crate::source::Range;
/// Represents `nil` literal
#[derive(Debug, Clone, PartialEq)]
pub struct Nil {
/// Location of the `nil` keyword
///
/// ```text
/// nil
/// ~~~
/// ```
pub expression_l: Range,
}
impl InnerNode for Nil {
fn expression(&self) -> &Range {
&self.expression_l
}
fn inspected_children(&self, _indent: usize) -> Vec<String> {
vec![]
}
fn str_type(&self) -> &'static str {
"nil"
}
fn print_with_locs(&self) {
println!("{}", self.inspect(0));
self.expression_l.print("expression");
}
}