Skip to content

Commit

Permalink
move parent visitor into ast module
Browse files Browse the repository at this point in the history
  • Loading branch information
anweiss committed Oct 25, 2022
1 parent 2c271dd commit 6e1dc6e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 4 additions & 3 deletions src/ast.rs → src/ast/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/// Parent visitor implementation
pub mod parent;

#[cfg(target_arch = "wasm32")]
extern crate console_error_panic_hook;

use crate::token::ControlOperator;

use super::token::{ByteValue, RangeValue, SocketPlug, Token, Value};
use crate::token::{ByteValue, ControlOperator, RangeValue, SocketPlug, Token, Value};

use std::{
fmt::{self, Write},
Expand Down
6 changes: 3 additions & 3 deletions src/validator/parent_visitor.rs → src/ast/parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use crate::{

use std::{borrow::Cow, fmt};

/// validation Result
/// Parent visitor result
pub type Result<T> = std::result::Result<T, Error>;

/// validation error
/// Parent visitor error
#[derive(Debug)]
pub enum Error {
/// Tree overwrite error
Expand Down Expand Up @@ -154,7 +154,7 @@ impl<'a, 'b: 'a> Node<'a, 'b> {
}
}

/// validator type
/// Parent visitor type
// #[derive(Clone)]
pub struct ParentVisitor<'a, 'b: 'a> {
arena_tree: ArenaTree<'a, 'b>,
Expand Down
3 changes: 0 additions & 3 deletions src/validator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ pub mod cbor;
/// JSON validation implementation
pub mod json;

/// parent visitor implementation
pub mod parent_visitor;

mod control;

use crate::{
Expand Down

0 comments on commit 6e1dc6e

Please sign in to comment.