Skip to content

Commit

Permalink
Move cursor and visitor to node:: namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyBlakey committed Jul 18, 2023
1 parent 987a103 commit 4272b06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
11 changes: 4 additions & 7 deletions crates/solidity/outputs/cargo/crate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,17 @@ mod public_api {
pub mod syntax {
pub mod nodes {
pub use crate::generated::cst::{Node, RuleNode, TokenNode};
pub use crate::generated::cursor::Cursor;
pub use crate::generated::kinds::{RuleKind, TokenKind};
pub use crate::generated::text_index::{TextIndex, TextRange, TextRangeExtensions};
pub use crate::generated::visitor::{
Visitor, VisitorEntryResponse, VisitorExitResponse,
};
}

pub mod parser {
pub use crate::generated::kinds::ProductionKind;
pub use crate::generated::parse_output::{ParseError, ParseOutput};
}

pub mod visitors {
pub use crate::generated::cursor::Cursor;
pub use crate::generated::visitor::{
Visitor, VisitorEntryResponse, VisitorExitResponse,
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ use semver::Version;
use slang_solidity::{
language::Language,
syntax::{
nodes::{Node, RuleKind, RuleNode, TokenKind},
nodes::{Cursor, Node, RuleKind, RuleNode, TokenKind, Visitor, VisitorEntryResponse},
parser::ProductionKind,
visitors::{Cursor, Visitor, VisitorEntryResponse},
},
};

Expand Down
6 changes: 3 additions & 3 deletions crates/solidity/testing/utils/src/cst_snapshots/test_nodes.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::rc::Rc;

use anyhow::Result;
use slang_solidity::syntax::{
nodes::{Node, RuleKind, RuleNode, TextRange, TokenKind, TokenNode},
visitors::{Cursor, Visitor, VisitorEntryResponse, VisitorExitResponse},
use slang_solidity::syntax::nodes::{
Cursor, Node, RuleKind, RuleNode, TextRange, TokenKind, TokenNode, Visitor,
VisitorEntryResponse, VisitorExitResponse,
};

#[derive(Debug)]
Expand Down

0 comments on commit 4272b06

Please sign in to comment.