2020-01-02 17:51:20 +00:00
|
|
|
#![recursion_limit = "2048"]
|
2019-07-03 20:31:15 +00:00
|
|
|
|
2019-10-18 12:08:04 +00:00
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate indexmap;
|
|
|
|
|
2019-07-03 20:31:15 +00:00
|
|
|
#[macro_use]
|
|
|
|
mod prelude;
|
2019-06-27 04:56:48 +00:00
|
|
|
|
2020-04-11 19:05:59 +00:00
|
|
|
#[cfg(test)]
|
|
|
|
extern crate quickcheck;
|
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use(quickcheck)]
|
|
|
|
extern crate quickcheck_macros;
|
|
|
|
|
2019-06-27 04:56:48 +00:00
|
|
|
mod cli;
|
|
|
|
mod commands;
|
2020-09-17 06:02:30 +00:00
|
|
|
#[cfg(feature = "rustyline-support")]
|
2020-07-18 02:55:10 +00:00
|
|
|
mod completion;
|
Extract core stuff into own crates
This commit extracts five new crates:
- nu-source, which contains the core source-code handling logic in Nu,
including Text, Span, and also the pretty.rs-based debug logic
- nu-parser, which is the parser and expander logic
- nu-protocol, which is the bulk of the types and basic conveniences
used by plugins
- nu-errors, which contains ShellError, ParseError and error handling
conveniences
- nu-textview, which is the textview plugin extracted into a crate
One of the major consequences of this refactor is that it's no longer
possible to `impl X for Spanned<Y>` outside of the `nu-source` crate, so
a lot of types became more concrete (Value became a concrete type
instead of Spanned<Value>, for example).
This also turned a number of inherent methods in the main nu crate into
plain functions (impl Value {} became a bunch of functions in the
`value` namespace in `crate::data::value`).
2019-11-26 02:30:48 +00:00
|
|
|
mod deserializer;
|
2020-07-17 22:22:43 +00:00
|
|
|
mod documentation;
|
2019-06-27 04:56:48 +00:00
|
|
|
mod env;
|
|
|
|
mod evaluate;
|
2020-09-19 21:29:51 +00:00
|
|
|
mod evaluation_context;
|
2019-06-27 04:56:48 +00:00
|
|
|
mod format;
|
2020-03-01 17:19:09 +00:00
|
|
|
mod futures;
|
2020-09-17 06:02:30 +00:00
|
|
|
#[cfg(feature = "rustyline-support")]
|
2019-06-27 04:56:48 +00:00
|
|
|
mod git;
|
2020-09-17 06:02:30 +00:00
|
|
|
#[cfg(feature = "rustyline-support")]
|
2020-07-15 07:51:59 +00:00
|
|
|
mod keybinding;
|
2020-04-11 19:05:29 +00:00
|
|
|
mod path;
|
2020-08-27 07:57:40 +00:00
|
|
|
mod plugin;
|
2020-12-30 23:38:31 +00:00
|
|
|
pub mod script;
|
2019-06-27 04:56:48 +00:00
|
|
|
mod shell;
|
2020-10-28 17:49:38 +00:00
|
|
|
pub mod types;
|
2020-05-18 03:52:56 +00:00
|
|
|
pub mod utils;
|
2019-06-27 04:56:48 +00:00
|
|
|
|
2020-05-18 12:56:01 +00:00
|
|
|
#[cfg(test)]
|
|
|
|
mod examples;
|
|
|
|
|
2020-09-17 06:02:30 +00:00
|
|
|
#[cfg(feature = "rustyline-support")]
|
|
|
|
pub use crate::cli::cli;
|
|
|
|
|
2021-01-01 02:12:16 +00:00
|
|
|
pub use crate::cli::{parse_and_eval, register_plugins, run_script_file};
|
2020-12-02 10:00:30 +00:00
|
|
|
pub use crate::commands::classified::block::run_block;
|
2020-05-14 00:35:22 +00:00
|
|
|
pub use crate::commands::command::{
|
2020-07-18 04:47:03 +00:00
|
|
|
whole_stream_command, CommandArgs, EvaluatedWholeStreamCommandArgs, Example, WholeStreamCommand,
|
2020-05-14 00:35:22 +00:00
|
|
|
};
|
2021-01-01 02:12:16 +00:00
|
|
|
|
|
|
|
pub use crate::commands::default_context::create_default_context;
|
2020-05-14 00:35:22 +00:00
|
|
|
pub use crate::commands::help::get_help;
|
2020-02-14 05:24:18 +00:00
|
|
|
pub use crate::env::environment_syncer::EnvironmentSyncer;
|
2019-07-04 05:11:56 +00:00
|
|
|
pub use crate::env::host::BasicHost;
|
2020-09-19 21:29:51 +00:00
|
|
|
pub use crate::evaluation_context::EvaluationContext;
|
2020-07-18 04:47:03 +00:00
|
|
|
pub use crate::prelude::ToOutputStream;
|
2020-08-18 07:00:02 +00:00
|
|
|
pub use nu_data::config;
|
|
|
|
pub use nu_data::dict::TaggedListBuilder;
|
|
|
|
pub use nu_data::primitive;
|
|
|
|
pub use nu_data::value;
|
2020-12-28 05:34:27 +00:00
|
|
|
pub use nu_stream::{InputStream, InterruptibleStream, OutputStream};
|
2019-12-09 18:52:01 +00:00
|
|
|
pub use nu_value_ext::ValueExt;
|
2019-08-30 17:29:04 +00:00
|
|
|
pub use num_traits::cast::ToPrimitive;
|
Extract core stuff into own crates
This commit extracts five new crates:
- nu-source, which contains the core source-code handling logic in Nu,
including Text, Span, and also the pretty.rs-based debug logic
- nu-parser, which is the parser and expander logic
- nu-protocol, which is the bulk of the types and basic conveniences
used by plugins
- nu-errors, which contains ShellError, ParseError and error handling
conveniences
- nu-textview, which is the textview plugin extracted into a crate
One of the major consequences of this refactor is that it's no longer
possible to `impl X for Spanned<Y>` outside of the `nu-source` crate, so
a lot of types became more concrete (Value became a concrete type
instead of Spanned<Value>, for example).
This also turned a number of inherent methods in the main nu crate into
plain functions (impl Value {} became a bunch of functions in the
`value` namespace in `crate::data::value`).
2019-11-26 02:30:48 +00:00
|
|
|
|
|
|
|
// TODO: Temporary redirect
|
2019-12-27 13:30:14 +00:00
|
|
|
pub use nu_protocol::{did_you_mean, TaggedDictBuilder};
|