-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move the inline
app.rs
modules to nu/
- Loading branch information
Showing
5 changed files
with
229 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ mod app; | |
mod config; | ||
mod edit; | ||
mod navigation; | ||
mod nu; | ||
mod terminal; | ||
mod tui; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use nu_protocol::{ast::PathMember, Span}; | ||
|
||
#[allow(dead_code)] | ||
/// a simplified [`PathMember`] that can be put in a single vector, without being too long | ||
pub(crate) enum PM<'a> { | ||
// the [`PathMember::String`] variant | ||
S(&'a str), | ||
// the [`PathMember::Int`] variant | ||
I(usize), | ||
} | ||
|
||
#[allow(dead_code)] | ||
pub(crate) fn to_path_member_vec(cell_path: Vec<PM>) -> Vec<PathMember> { | ||
cell_path | ||
.iter() | ||
.map(|x| match *x { | ||
PM::S(val) => PathMember::String { | ||
val: val.into(), | ||
span: Span::test_data(), | ||
optional: false, | ||
}, | ||
PM::I(val) => PathMember::Int { | ||
val, | ||
span: Span::test_data(), | ||
optional: false, | ||
}, | ||
}) | ||
.collect::<Vec<_>>() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub(super) mod cell_path; | ||
pub(super) mod value; |
Oops, something went wrong.