Skip to content

Commit

Permalink
fixed some of the shit
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanWoollett-Light committed Nov 23, 2023
1 parent 1fb360b commit e8b1b23
Show file tree
Hide file tree
Showing 3 changed files with 1,029 additions and 352 deletions.
17 changes: 1 addition & 16 deletions src/ast.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
/// The AST maps closely to assembly for simplicity.
#[derive(Debug, Eq, PartialEq, Default, Clone)]
pub struct Node {
pub statement: Statement,
pub child: Option<usize>,
pub next: Option<usize>,
}
impl Node {
pub fn new(statement: Statement) -> Self {
Self {
statement,
child: None,
next: None,
}
}
}

use std::ptr::NonNull;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand All @@ -23,6 +7,7 @@ pub enum Preceding {
Previous(NonNull<NewNode>),
}

#[derive(Debug)]
pub struct NewNode {
pub statement: Statement,
pub preceding: Option<Preceding>,
Expand Down
Loading

0 comments on commit e8b1b23

Please sign in to comment.