1#![doc = include_str!("readme.md")]
2#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct JRoot {
5 pub items: Vec<JItem>,
7}
8
9impl JRoot {
10 pub fn new(items: Vec<JItem>) -> Self {
12 Self { items }
13 }
14
15 pub fn items(&self) -> &[JItem] {
17 &self.items
18 }
19}
20
21#[derive(Debug, Clone, PartialEq, Eq)]
23pub enum JItem {
24 Sentence(JSentence),
26}
27
28#[derive(Debug, Clone, PartialEq, Eq)]
30pub struct JSentence {
31 pub content: String,
33}
34
35impl JSentence {
36 pub fn new(content: String) -> Self {
38 Self { content }
39 }
40}
41
42#[derive(Debug, Clone, PartialEq, Eq)]
44pub struct JAssignment {
45 pub name: String,
47 pub is_global: bool,
49 pub expression: String,
51}