#![doc = include_str!("readme.md")]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct JRoot {
pub items: Vec<JItem>,
}
impl JRoot {
pub fn new(items: Vec<JItem>) -> Self {
Self { items }
}
pub fn items(&self) -> &[JItem] {
&self.items
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum JItem {
Sentence(JSentence),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct JSentence {
pub content: String,
}
impl JSentence {
pub fn new(content: String) -> Self {
Self { content }
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct JAssignment {
pub name: String,
pub is_global: bool,
pub expression: String,
}