mirror of
https://github.com/casey/just.git
synced 2025-12-23 11:37:29 +00:00
Move StringState into module
This commit is contained in:
parent
e45bd76750
commit
8a97eaf79e
3 changed files with 34 additions and 98 deletions
119
src/lib.rs
119
src/lib.rs
|
|
@ -5,99 +5,33 @@
|
|||
//! library interface. It may break or change at any time.
|
||||
|
||||
pub(crate) use {
|
||||
crate::attribute::{Attribute, AttributeDiscriminant},
|
||||
crate::{
|
||||
alias::Alias,
|
||||
alias_style::AliasStyle,
|
||||
analyzer::Analyzer,
|
||||
argument_parser::ArgumentParser,
|
||||
assignment::Assignment,
|
||||
assignment_resolver::AssignmentResolver,
|
||||
ast::Ast,
|
||||
attribute::{Attribute, AttributeDiscriminant},
|
||||
attribute_set::AttributeSet,
|
||||
binding::Binding,
|
||||
color::Color,
|
||||
color_display::ColorDisplay,
|
||||
command_color::CommandColor,
|
||||
command_ext::CommandExt,
|
||||
compilation::Compilation,
|
||||
compile_error::CompileError,
|
||||
compile_error_kind::CompileErrorKind,
|
||||
compiler::Compiler,
|
||||
condition::Condition,
|
||||
conditional_operator::ConditionalOperator,
|
||||
config::Config,
|
||||
config_error::ConfigError,
|
||||
constants::constants,
|
||||
count::Count,
|
||||
delimiter::Delimiter,
|
||||
dependency::Dependency,
|
||||
dump_format::DumpFormat,
|
||||
enclosure::Enclosure,
|
||||
error::Error,
|
||||
evaluator::Evaluator,
|
||||
execution_context::ExecutionContext,
|
||||
executor::Executor,
|
||||
expression::Expression,
|
||||
format_string_part::FormatStringPart,
|
||||
fragment::Fragment,
|
||||
function::Function,
|
||||
interpreter::Interpreter,
|
||||
item::Item,
|
||||
justfile::Justfile,
|
||||
keyed::Keyed,
|
||||
keyword::Keyword,
|
||||
lexer::Lexer,
|
||||
line::Line,
|
||||
list::List,
|
||||
load_dotenv::load_dotenv,
|
||||
loader::Loader,
|
||||
module_path::ModulePath,
|
||||
name::Name,
|
||||
namepath::Namepath,
|
||||
ordinal::Ordinal,
|
||||
output_error::OutputError,
|
||||
parameter::Parameter,
|
||||
parameter_kind::ParameterKind,
|
||||
parser::Parser,
|
||||
platform::Platform,
|
||||
platform_interface::PlatformInterface,
|
||||
position::Position,
|
||||
positional::Positional,
|
||||
ran::Ran,
|
||||
range_ext::RangeExt,
|
||||
recipe::Recipe,
|
||||
recipe_resolver::RecipeResolver,
|
||||
recipe_signature::RecipeSignature,
|
||||
scope::Scope,
|
||||
search::Search,
|
||||
search_config::SearchConfig,
|
||||
search_error::SearchError,
|
||||
set::Set,
|
||||
setting::Setting,
|
||||
settings::Settings,
|
||||
shebang::Shebang,
|
||||
show_whitespace::ShowWhitespace,
|
||||
signal::Signal,
|
||||
signal_handler::SignalHandler,
|
||||
source::Source,
|
||||
string_delimiter::StringDelimiter,
|
||||
string_kind::StringKind,
|
||||
string_literal::StringLiteral,
|
||||
subcommand::Subcommand,
|
||||
suggestion::Suggestion,
|
||||
table::Table,
|
||||
thunk::Thunk,
|
||||
token::Token,
|
||||
token_kind::TokenKind,
|
||||
unresolved_dependency::UnresolvedDependency,
|
||||
unresolved_recipe::UnresolvedRecipe,
|
||||
unstable_feature::UnstableFeature,
|
||||
use_color::UseColor,
|
||||
variables::Variables,
|
||||
verbosity::Verbosity,
|
||||
warning::Warning,
|
||||
which::which,
|
||||
alias::Alias, alias_style::AliasStyle, analyzer::Analyzer, argument_parser::ArgumentParser,
|
||||
assignment::Assignment, assignment_resolver::AssignmentResolver, ast::Ast,
|
||||
attribute_set::AttributeSet, binding::Binding, color::Color, color_display::ColorDisplay,
|
||||
command_color::CommandColor, command_ext::CommandExt, compilation::Compilation,
|
||||
compile_error::CompileError, compile_error_kind::CompileErrorKind, compiler::Compiler,
|
||||
condition::Condition, conditional_operator::ConditionalOperator, config::Config,
|
||||
config_error::ConfigError, constants::constants, count::Count, delimiter::Delimiter,
|
||||
dependency::Dependency, dump_format::DumpFormat, enclosure::Enclosure, error::Error,
|
||||
evaluator::Evaluator, execution_context::ExecutionContext, executor::Executor,
|
||||
expression::Expression, format_string_part::FormatStringPart, fragment::Fragment,
|
||||
function::Function, interpreter::Interpreter, item::Item, justfile::Justfile, keyed::Keyed,
|
||||
keyword::Keyword, lexer::Lexer, line::Line, list::List, load_dotenv::load_dotenv,
|
||||
loader::Loader, module_path::ModulePath, name::Name, namepath::Namepath, ordinal::Ordinal,
|
||||
output_error::OutputError, parameter::Parameter, parameter_kind::ParameterKind, parser::Parser,
|
||||
platform::Platform, platform_interface::PlatformInterface, position::Position,
|
||||
positional::Positional, ran::Ran, range_ext::RangeExt, recipe::Recipe,
|
||||
recipe_resolver::RecipeResolver, recipe_signature::RecipeSignature, scope::Scope,
|
||||
search::Search, search_config::SearchConfig, search_error::SearchError, set::Set,
|
||||
setting::Setting, settings::Settings, shebang::Shebang, show_whitespace::ShowWhitespace,
|
||||
signal::Signal, signal_handler::SignalHandler, source::Source,
|
||||
string_delimiter::StringDelimiter, string_kind::StringKind, string_literal::StringLiteral,
|
||||
string_state::StringState, subcommand::Subcommand, suggestion::Suggestion, table::Table,
|
||||
thunk::Thunk, token::Token, token_kind::TokenKind, unresolved_dependency::UnresolvedDependency,
|
||||
unresolved_recipe::UnresolvedRecipe, unstable_feature::UnstableFeature, use_color::UseColor,
|
||||
variables::Variables, verbosity::Verbosity, warning::Warning, which::which,
|
||||
},
|
||||
camino::Utf8Path,
|
||||
clap::ValueEnum,
|
||||
|
|
@ -264,6 +198,7 @@ mod source;
|
|||
mod string_delimiter;
|
||||
mod string_kind;
|
||||
mod string_literal;
|
||||
mod string_state;
|
||||
mod subcommand;
|
||||
mod suggestion;
|
||||
mod table;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
use {super::*, TokenKind::*};
|
||||
|
||||
enum StringState {
|
||||
FormatContinue(StringKind),
|
||||
FormatStart,
|
||||
Normal,
|
||||
}
|
||||
|
||||
/// Just language parser
|
||||
///
|
||||
/// The parser is a (hopefully) straightforward recursive descent parser.
|
||||
|
|
|
|||
7
src/string_state.rs
Normal file
7
src/string_state.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
use super::*;
|
||||
|
||||
pub(crate) enum StringState {
|
||||
FormatContinue(StringKind),
|
||||
FormatStart,
|
||||
Normal,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue