2021-09-20 21:37:26 +00:00
use miette ::Diagnostic ;
2021-09-02 22:58:15 +00:00
use nu_protocol ::{ Span , Type } ;
2021-09-20 21:37:26 +00:00
use thiserror ::Error ;
2021-08-10 18:51:08 +00:00
2021-09-20 21:37:26 +00:00
#[ derive(Clone, Debug, Error, Diagnostic) ]
2021-08-16 23:00:00 +00:00
pub enum ParseError {
2021-09-20 21:37:26 +00:00
/// The parser encountered unexpected tokens, when the code should have
/// finished. You should remove these or finish adding what you intended
/// to add.
#[ error( " Extra tokens in code. " ) ]
#[ diagnostic(
code ( nu ::parser ::extra_tokens ) ,
url ( docsrs ) ,
help ( " Try removing them. " )
) ]
ExtraTokens ( #[ label = " extra tokens " ] Span ) ,
#[ error( " Extra positional argument. " ) ]
2022-01-03 23:14:33 +00:00
#[ diagnostic(code(nu::parser::extra_positional), url(docsrs), help( " Usage: {0} " )) ]
ExtraPositional ( String , #[ label = " extra positional argument " ] Span ) ,
2021-09-20 21:37:26 +00:00
2022-12-31 11:18:53 +00:00
#[ error( " Required positional parameter after optional parameter " ) ]
2022-03-07 20:08:56 +00:00
#[ diagnostic(code(nu::parser::required_after_optional), url(docsrs)) ]
RequiredAfterOptional (
String ,
#[ label = " required parameter {0} after optional parameter " ] Span ,
) ,
2021-09-20 21:37:26 +00:00
#[ error( " Unexpected end of code. " ) ]
#[ diagnostic(code(nu::parser::unexpected_eof), url(docsrs)) ]
2021-09-22 05:29:53 +00:00
UnexpectedEof ( String , #[ label( " expected closing {0} " ) ] Span ) ,
2021-09-20 21:37:26 +00:00
#[ error( " Unclosed delimiter. " ) ]
#[ diagnostic(code(nu::parser::unclosed_delimiter), url(docsrs)) ]
Unclosed ( String , #[ label( " unclosed {0} " ) ] Span ) ,
#[ error( " Parse mismatch during operation. " ) ]
#[ diagnostic(code(nu::parser::parse_mismatch), url(docsrs)) ]
Expected ( String , #[ label( " expected {0} " ) ] Span ) ,
#[ error( " Type mismatch during operation. " ) ]
#[ diagnostic(code(nu::parser::type_mismatch), url(docsrs)) ]
Mismatch ( String , String , #[ label( " expected {0}, found {1} " ) ] Span ) , // expected, found, span
2022-12-07 23:02:11 +00:00
#[ error( " The '&&' operator is not supported in Nushell " ) ]
#[ diagnostic(
code ( nu ::parser ::shell_andand ) ,
url ( docsrs ) ,
help ( " use ';' instead of the shell '&&', or 'and' instead of the boolean '&&' " )
) ]
ShellAndAnd ( #[ label( " instead of '&&', use ';' or 'and' " ) ] Span ) ,
#[ error( " The '||' operator is not supported in Nushell " ) ]
#[ diagnostic(
code ( nu ::parser ::shell_oror ) ,
url ( docsrs ) ,
help ( " use 'try' instead of the shell '||', or 'or' instead of the boolean '||' " )
) ]
ShellOrOr ( #[ label( " instead of '||', use 'try' or 'or' " ) ] Span ) ,
#[ error( " The '2>' shell operation is 'err>' in Nushell. " ) ]
#[ diagnostic(code(nu::parser::shell_err), url(docsrs)) ]
ShellErrRedirect ( #[ label( " use 'err>' instead of '2>' in Nushell " ) ] Span ) ,
#[ error( " The '2>&1' shell operation is 'out+err>' in Nushell. " ) ]
#[ diagnostic(
code ( nu ::parser ::shell_outerr ) ,
url ( docsrs ) ,
help ( " Nushell redirection will write all of stdout before stderr. " )
) ]
ShellOutErrRedirect ( #[ label( " use 'out+err>' instead of '2>&1' in Nushell " ) ] Span ) ,
2021-09-21 04:10:29 +00:00
#[ error( " Types mismatched for operation. " ) ]
2021-09-20 21:37:26 +00:00
#[ diagnostic(
code ( nu ::parser ::unsupported_operation ) ,
url ( docsrs ) ,
help ( " Change {2} or {4} to be the right types and try again. " )
) ]
UnsupportedOperation (
#[ label = " doesn't support these values. " ] Span ,
#[ label( " {2} " ) ] Span ,
Type ,
#[ label( " {4} " ) ] Span ,
Type ,
) ,
2022-11-11 06:51:08 +00:00
#[ error( " Capture of mutable variable. " ) ]
#[ diagnostic(code(nu::parser::expected_keyword), url(docsrs)) ]
CaptureOfMutableVar ( #[ label( " capture of mutable variable " ) ] Span ) ,
2021-09-20 21:37:26 +00:00
#[ error( " Expected keyword. " ) ]
#[ diagnostic(code(nu::parser::expected_keyword), url(docsrs)) ]
ExpectedKeyword ( String , #[ label( " expected {0} " ) ] Span ) ,
2021-09-28 18:12:46 +00:00
#[ error( " Unexpected keyword. " ) ]
#[ diagnostic(
code ( nu ::parser ::unexpected_keyword ) ,
url ( docsrs ) ,
2022-01-15 15:26:52 +00:00
help ( " '{0}' keyword is allowed only in a module. " )
2021-09-28 18:12:46 +00:00
) ]
UnexpectedKeyword ( String , #[ label( " unexpected {0} " ) ] Span ) ,
2022-11-26 21:59:43 +00:00
#[ error( " Unknown operator " ) ]
#[ diagnostic(code(nu::parser::unknown_operator), url(docsrs), help( " {1} " )) ]
UnknownOperator (
& 'static str ,
& 'static str ,
#[ label( " Operator '{0}' not supported " ) ] Span ,
) ,
2022-01-15 15:26:52 +00:00
#[ error( " Statement used in pipeline. " ) ]
#[ diagnostic(
code ( nu ::parser ::unexpected_keyword ) ,
url ( docsrs ) ,
help (
" '{0}' keyword is not allowed in pipeline. Use '{0}' by itself, outside of a pipeline. "
)
) ]
2022-02-15 19:31:14 +00:00
BuiltinCommandInPipeline ( String , #[ label( " not allowed in pipeline " ) ] Span ) ,
2022-01-15 15:26:52 +00:00
2022-05-26 00:13:14 +00:00
#[ error( " Let statement used in pipeline. " ) ]
#[ diagnostic(
code ( nu ::parser ::unexpected_keyword ) ,
url ( docsrs ) ,
help (
2022-05-30 07:26:33 +00:00
" Assigning '{0}' to '{1}' does not produce a value to be piped. If the pipeline result is meant to be assigned to '{1}', use 'let {1} = ({0} | ...)'. "
2022-05-26 00:13:14 +00:00
)
) ]
LetInPipeline ( String , String , #[ label( " let in pipeline " ) ] Span ) ,
2023-01-19 23:11:48 +00:00
#[ error( " Const statement used in pipeline. " ) ]
#[ diagnostic(
code ( nu ::parser ::unexpected_keyword ) ,
url ( docsrs ) ,
help (
" Assigning '{0}' to '{1}' does not produce a value to be piped. If the pipeline result is meant to be assigned to '{1}', use 'const {1} = ({0} | ...)'. "
)
) ]
ConstInPipeline ( String , String , #[ label( " const in pipeline " ) ] Span ) ,
2022-11-11 06:51:08 +00:00
#[ error( " Mut statement used in pipeline. " ) ]
#[ diagnostic(
code ( nu ::parser ::unexpected_keyword ) ,
url ( docsrs ) ,
help (
" Assigning '{0}' to '{1}' does not produce a value to be piped. If the pipeline result is meant to be assigned to '{1}', use 'mut {1} = ({0} | ...)'. "
)
) ]
2023-01-19 23:11:48 +00:00
MutInPipeline ( String , String , #[ label( " mut in pipeline " ) ] Span ) ,
2022-11-11 06:51:08 +00:00
2022-06-24 21:55:25 +00:00
#[ error( " Let used with builtin variable name. " ) ]
#[ diagnostic(
code ( nu ::parser ::let_builtin_var ) ,
url ( docsrs ) ,
help ( " '{0}' is the name of a builtin Nushell variable. `let` cannot assign to it. " )
) ]
LetBuiltinVar ( String , #[ label( " already a builtin variable " ) ] Span ) ,
2023-01-19 23:11:48 +00:00
#[ error( " Const used with builtin variable name. " ) ]
#[ diagnostic(
code ( nu ::parser ::let_builtin_var ) ,
url ( docsrs ) ,
help ( " '{0}' is the name of a builtin Nushell variable. `const` cannot assign to it. " )
) ]
ConstBuiltinVar ( String , #[ label( " already a builtin variable " ) ] Span ) ,
2022-11-11 06:51:08 +00:00
#[ error( " Mut used with builtin variable name. " ) ]
#[ diagnostic(
code ( nu ::parser ::let_builtin_var ) ,
url ( docsrs ) ,
help ( " '{0}' is the name of a builtin Nushell variable. `mut` cannot assign to it. " )
) ]
MutBuiltinVar ( String , #[ label( " already a builtin variable " ) ] Span ) ,
2021-12-12 11:50:35 +00:00
#[ error( " Incorrect value " ) ]
#[ diagnostic(code(nu::parser::incorrect_value), url(docsrs), help( " {2} " )) ]
IncorrectValue ( String , #[ label( " unexpected {0} " ) ] Span , String ) ,
2021-09-20 21:37:26 +00:00
#[ error( " Multiple rest params. " ) ]
#[ diagnostic(code(nu::parser::multiple_rest_params), url(docsrs)) ]
MultipleRestParams ( #[ label = " multiple rest params " ] Span ) ,
#[ error( " Variable not found. " ) ]
#[ diagnostic(code(nu::parser::variable_not_found), url(docsrs)) ]
VariableNotFound ( #[ label = " variable not found " ] Span ) ,
2021-10-12 05:08:55 +00:00
#[ error( " Variable name not supported. " ) ]
#[ diagnostic(code(nu::parser::variable_not_valid), url(docsrs)) ]
VariableNotValid ( #[ label = " variable name can't contain spaces or quotes " ] Span ) ,
2022-09-28 22:08:38 +00:00
#[ error( " Alias name not supported. " ) ]
#[ diagnostic(code(nu::parser::variable_not_valid), url(docsrs)) ]
2022-12-27 23:00:44 +00:00
AliasNotValid (
#[ label = " alias name can't be a number, a filesize, or contain a hash # or caret ^ " ] Span ,
) ,
2022-12-22 20:31:34 +00:00
#[ error( " Command name not supported. " ) ]
#[ diagnostic(code(nu::parser::variable_not_valid), url(docsrs)) ]
CommandDefNotValid (
2022-12-27 23:00:44 +00:00
#[ label = " command name can't be a number, a filesize, or contain a hash # or caret ^ " ]
Span ,
2022-12-22 20:31:34 +00:00
) ,
2022-09-28 22:08:38 +00:00
2021-09-26 10:25:52 +00:00
#[ error( " Module not found. " ) ]
2022-03-25 21:43:46 +00:00
#[ diagnostic(
code ( nu ::parser ::module_not_found ) ,
url ( docsrs ) ,
2022-05-17 11:22:31 +00:00
help ( " module files and their paths must be available before your script is run as parsing occurs before anything is evaluated " )
2022-03-25 21:43:46 +00:00
) ]
2021-09-26 10:25:52 +00:00
ModuleNotFound ( #[ label = " module not found " ] Span ) ,
2022-09-04 20:19:20 +00:00
#[ error( " Cyclical module import. " ) ]
#[ diagnostic(code(nu::parser::cyclical_module_import), url(docsrs), help( " {0} " )) ]
CyclicalModuleImport ( String , #[ label = " detected cyclical module import " ] Span ) ,
2022-05-07 19:39:22 +00:00
#[ error( " Active overlay not found. " ) ]
#[ diagnostic(code(nu::parser::active_overlay_not_found), url(docsrs)) ]
ActiveOverlayNotFound ( #[ label = " not an active overlay " ] Span ) ,
2022-08-12 18:06:51 +00:00
#[ error( " Overlay prefix mismatch. " ) ]
#[ diagnostic(
code ( nu ::parser ::overlay_prefix_mismatch ) ,
url ( docsrs ) ,
help ( " Overlay {0} already exists {1} a prefix. To add it again, do it {1} the --prefix flag. " )
) ]
OverlayPrefixMismatch (
String ,
String ,
#[ label = " already exists {1} a prefix " ] Span ,
) ,
2022-05-07 19:39:22 +00:00
#[ error( " Module or overlay not found. " ) ]
#[ diagnostic(
code ( nu ::parser ::module_or_overlay_not_found ) ,
url ( docsrs ) ,
help ( " Requires either an existing overlay, a module, or an import pattern defining a module. " )
) ]
ModuleOrOverlayNotFound ( #[ label = " not a module or an overlay " ] Span ) ,
#[ error( " Cannot remove the last overlay. " ) ]
#[ diagnostic(
code ( nu ::parser ::cant_remove_last_overlay ) ,
url ( docsrs ) ,
help ( " At least one overlay must always be active. " )
) ]
CantRemoveLastOverlay ( #[ label = " this is the last overlay, can't remove it " ] Span ) ,
2022-08-21 14:27:56 +00:00
#[ error( " Cannot hide default overlay. " ) ]
2022-05-07 19:39:22 +00:00
#[ diagnostic(
2022-08-21 14:27:56 +00:00
code ( nu ::parser ::cant_hide_default_overlay ) ,
2022-05-07 19:39:22 +00:00
url ( docsrs ) ,
2022-08-21 14:27:56 +00:00
help ( " '{0}' is a default overlay. Default overlays cannot be hidden. " )
2022-05-07 19:39:22 +00:00
) ]
2022-08-21 14:27:56 +00:00
CantHideDefaultOverlay ( String , #[ label = " can't hide overlay " ] Span ) ,
2022-05-07 19:39:22 +00:00
2022-08-13 14:28:18 +00:00
#[ error( " Cannot add overlay. " ) ]
#[ diagnostic(code(nu::parser::cant_add_overlay_help), url(docsrs), help( " {0} " )) ]
CantAddOverlayHelp ( String , #[ label = " cannot add this overlay " ] Span ) ,
2021-11-15 23:16:06 +00:00
#[ error( " Not found. " ) ]
#[ diagnostic(code(nu::parser::not_found), url(docsrs)) ]
NotFound ( #[ label = " did not find anything under this name " ] Span ) ,
2021-10-01 20:16:27 +00:00
#[ error( " Duplicate command definition within a block. " ) ]
#[ diagnostic(code(nu::parser::duplicate_command_def), url(docsrs)) ]
DuplicateCommandDef ( #[ label = " defined more than once " ] Span ) ,
2021-09-20 21:37:26 +00:00
#[ error( " Unknown command. " ) ]
#[ diagnostic(
code ( nu ::parser ::unknown_command ) ,
url ( docsrs ) ,
2021-10-12 17:44:23 +00:00
// TODO: actual suggestions like "Did you mean `foo`?"
2021-09-20 21:37:26 +00:00
) ]
UnknownCommand ( #[ label = " unknown command " ] Span ) ,
2021-10-31 15:53:53 +00:00
#[ error( " Non-UTF8 string. " ) ]
2021-09-20 21:37:26 +00:00
#[ diagnostic(code(nu::parser::non_utf8), url(docsrs)) ]
2021-10-31 15:53:53 +00:00
NonUtf8 ( #[ label = " non-UTF8 string " ] Span ) ,
2021-09-20 21:37:26 +00:00
2021-09-21 04:03:06 +00:00
#[ error( " The `{0}` command doesn't have flag `{1}`. " ) ]
2022-12-13 12:45:33 +00:00
#[ diagnostic(code(nu::parser::unknown_flag), url(docsrs), help( " {3} " )) ]
UnknownFlag ( String , String , #[ label = " unknown flag " ] Span , String ) ,
2021-09-20 21:37:26 +00:00
#[ error( " Unknown type. " ) ]
#[ diagnostic(code(nu::parser::unknown_type), url(docsrs)) ]
UnknownType ( #[ label = " unknown type " ] Span ) ,
2022-01-03 23:14:33 +00:00
#[ error( " Missing flag argument. " ) ]
2021-09-20 21:37:26 +00:00
#[ diagnostic(code(nu::parser::missing_flag_param), url(docsrs)) ]
2022-01-03 23:14:33 +00:00
MissingFlagParam ( String , #[ label = " flag missing {0} argument " ] Span ) ,
2021-09-20 21:37:26 +00:00
#[ error( " Batches of short flags can't take arguments. " ) ]
#[ diagnostic(code(nu::parser::short_flag_arg_cant_take_arg), url(docsrs)) ]
ShortFlagBatchCantTakeArg ( #[ label = " short flag batches can't take args " ] Span ) ,
#[ error( " Missing required positional argument. " ) ]
2022-01-03 23:14:33 +00:00
#[ diagnostic(code(nu::parser::missing_positional), url(docsrs), help( " Usage: {2} " )) ]
MissingPositional ( String , #[ label( " missing {0} " ) ] Span , String ) ,
2021-09-20 21:37:26 +00:00
2022-01-03 23:14:33 +00:00
#[ error( " Missing argument to `{1}`. " ) ]
2021-09-20 21:37:26 +00:00
#[ diagnostic(code(nu::parser::keyword_missing_arg), url(docsrs)) ]
2022-01-03 23:14:33 +00:00
KeywordMissingArgument (
String ,
String ,
#[ label( " missing {0} value that follows {1} " ) ] Span ,
) ,
2021-09-20 21:37:26 +00:00
#[ error( " Missing type. " ) ]
#[ diagnostic(code(nu::parser::missing_type), url(docsrs)) ]
MissingType ( #[ label = " expected type " ] Span ) ,
#[ error( " Type mismatch. " ) ]
#[ diagnostic(code(nu::parser::type_mismatch), url(docsrs)) ]
TypeMismatch ( Type , Type , #[ label( " expected {0:?}, found {1:?} " ) ] Span ) , // expected, found, span
#[ error( " Missing required flag. " ) ]
#[ diagnostic(code(nu::parser::missing_required_flag), url(docsrs)) ]
MissingRequiredFlag ( String , #[ label( " missing required flag {0} " ) ] Span ) ,
#[ error( " Incomplete math expression. " ) ]
#[ diagnostic(code(nu::parser::incomplete_math_expression), url(docsrs)) ]
IncompleteMathExpression ( #[ label = " incomplete math expression " ] Span ) ,
#[ error( " Unknown state. " ) ]
#[ diagnostic(code(nu::parser::unknown_state), url(docsrs)) ]
UnknownState ( String , #[ label( " {0} " ) ] Span ) ,
2021-11-15 23:16:06 +00:00
#[ error( " Internal error. " ) ]
#[ diagnostic(code(nu::parser::unknown_state), url(docsrs)) ]
InternalError ( String , #[ label( " {0} " ) ] Span ) ,
2021-09-20 21:37:26 +00:00
#[ error( " Parser incomplete. " ) ]
#[ diagnostic(code(nu::parser::parser_incomplete), url(docsrs)) ]
IncompleteParser ( #[ label = " parser support missing for this expression " ] Span ) ,
#[ error( " Rest parameter needs a name. " ) ]
#[ diagnostic(code(nu::parser::rest_needs_name), url(docsrs)) ]
RestNeedsName ( #[ label = " needs a parameter name " ] Span ) ,
2022-02-17 11:40:24 +00:00
#[ error( " Parameter not correct type. " ) ]
#[ diagnostic(code(nu::parser::parameter_mismatch_type), url(docsrs)) ]
ParameterMismatchType (
String ,
String ,
String ,
#[ label = " parameter {0} needs to be '{1}' instead of '{2}' " ] Span ,
) ,
2021-09-20 21:37:26 +00:00
#[ error( " Extra columns. " ) ]
#[ diagnostic(code(nu::parser::extra_columns), url(docsrs)) ]
ExtraColumns (
usize ,
#[ label( " expected {0} column{} " , if *.0 == 1 { " " } else { " s " }) ] Span ,
) ,
#[ error( " Missing columns. " ) ]
#[ diagnostic(code(nu::parser::missing_columns), url(docsrs)) ]
MissingColumns (
usize ,
#[ label( " expected {0} column{} " , if *.0 == 1 { " " } else { " s " }) ] Span ,
) ,
#[ error( " {0} " ) ]
#[ diagnostic(code(nu::parser::assignment_mismatch), url(docsrs)) ]
AssignmentMismatch ( String , String , #[ label( " {1} " ) ] Span ) ,
2021-09-26 18:39:19 +00:00
#[ error( " Missing import pattern. " ) ]
#[ diagnostic(code(nu::parser::missing_import_pattern), url(docsrs)) ]
MissingImportPattern ( #[ label = " needs an import pattern " ] Span ) ,
2021-10-19 20:38:49 +00:00
#[ error( " Wrong import pattern structure. " ) ]
#[ diagnostic(code(nu::parser::missing_import_pattern), url(docsrs)) ]
WrongImportPattern ( #[ label = " invalid import pattern structure " ] Span ) ,
2021-11-15 23:16:06 +00:00
#[ error( " Export not found. " ) ]
2021-09-26 18:39:19 +00:00
#[ diagnostic(code(nu::parser::export_not_found), url(docsrs)) ]
ExportNotFound ( #[ label = " could not find imports " ] Span ) ,
2021-10-31 08:17:01 +00:00
2022-03-25 21:43:46 +00:00
#[ error( " File not found " ) ]
#[ diagnostic(
code ( nu ::parser ::sourced_file_not_found ) ,
url ( docsrs ) ,
help ( " sourced files need to be available before your script is run " )
) ]
SourcedFileNotFound ( String , #[ label( " File not found: {0} " ) ] Span ) ,
#[ error( " File not found " ) ]
#[ diagnostic(
code ( nu ::parser ::registered_file_not_found ) ,
url ( docsrs ) ,
help ( " registered files need to be available before your script is run " )
) ]
RegisteredFileNotFound ( String , #[ label( " File not found: {0} " ) ] Span ) ,
2021-12-12 11:50:35 +00:00
#[ error( " File not found " ) ]
2021-12-02 06:36:30 +00:00
#[ diagnostic(code(nu::parser::file_not_found), url(docsrs)) ]
2021-12-12 11:50:35 +00:00
FileNotFound ( String , #[ label( " File not found: {0} " ) ] Span ) ,
2021-10-31 08:17:01 +00:00
2022-05-07 19:39:22 +00:00
/// Error while trying to read a file
///
/// ## Resolution
///
/// The error will show the result from a file operation
#[ error( " Error trying to read file " ) ]
#[ diagnostic(code(nu::shell::error_reading_file), url(docsrs)) ]
ReadingFile ( String , #[ label( " {0} " ) ] Span ) ,
2022-12-21 22:21:03 +00:00
/// Tried assigning non-constant value to a constant
///
/// ## Resolution
///
/// Only a subset of expressions are allowed to be assigned as a constant during parsing.
#[ error( " Not a constant. " ) ]
#[ diagnostic(
code ( nu ::parser ::not_a_constant ) ,
url ( docsrs ) ,
help ( " Only a subset of expressions are allowed constants during parsing. Try using the 'let' command or typing the value literally. " )
) ]
NotAConstant ( #[ label = " Value is not a parse-time constant " ] Span ) ,
2021-12-02 05:42:56 +00:00
#[ error( " {0} " ) ]
#[ diagnostic() ]
LabeledError ( String , String , #[ label( " {1} " ) ] Span ) ,
2021-08-16 23:00:00 +00:00
}
2022-02-21 03:31:50 +00:00
impl ParseError {
pub fn span ( & self ) -> Span {
match self {
ParseError ::ExtraTokens ( s ) = > * s ,
ParseError ::ExtraPositional ( _ , s ) = > * s ,
ParseError ::UnexpectedEof ( _ , s ) = > * s ,
ParseError ::Unclosed ( _ , s ) = > * s ,
ParseError ::Expected ( _ , s ) = > * s ,
ParseError ::Mismatch ( _ , _ , s ) = > * s ,
ParseError ::UnsupportedOperation ( _ , _ , _ , s , _ ) = > * s ,
ParseError ::ExpectedKeyword ( _ , s ) = > * s ,
ParseError ::UnexpectedKeyword ( _ , s ) = > * s ,
ParseError ::BuiltinCommandInPipeline ( _ , s ) = > * s ,
2022-05-26 00:13:14 +00:00
ParseError ::LetInPipeline ( _ , _ , s ) = > * s ,
2022-11-11 06:51:08 +00:00
ParseError ::MutInPipeline ( _ , _ , s ) = > * s ,
2023-01-19 23:11:48 +00:00
ParseError ::ConstInPipeline ( _ , _ , s ) = > * s ,
2022-06-24 21:55:25 +00:00
ParseError ::LetBuiltinVar ( _ , s ) = > * s ,
2022-11-11 06:51:08 +00:00
ParseError ::MutBuiltinVar ( _ , s ) = > * s ,
2023-01-19 23:11:48 +00:00
ParseError ::ConstBuiltinVar ( _ , s ) = > * s ,
2022-11-11 06:51:08 +00:00
ParseError ::CaptureOfMutableVar ( s ) = > * s ,
2022-02-21 03:31:50 +00:00
ParseError ::IncorrectValue ( _ , s , _ ) = > * s ,
ParseError ::MultipleRestParams ( s ) = > * s ,
ParseError ::VariableNotFound ( s ) = > * s ,
ParseError ::VariableNotValid ( s ) = > * s ,
2022-09-28 22:08:38 +00:00
ParseError ::AliasNotValid ( s ) = > * s ,
2022-12-22 20:31:34 +00:00
ParseError ::CommandDefNotValid ( s ) = > * s ,
2022-02-21 03:31:50 +00:00
ParseError ::ModuleNotFound ( s ) = > * s ,
2022-09-04 20:19:20 +00:00
ParseError ::CyclicalModuleImport ( _ , s ) = > * s ,
2022-05-07 19:39:22 +00:00
ParseError ::ModuleOrOverlayNotFound ( s ) = > * s ,
ParseError ::ActiveOverlayNotFound ( s ) = > * s ,
2022-08-12 18:06:51 +00:00
ParseError ::OverlayPrefixMismatch ( _ , _ , s ) = > * s ,
2022-05-07 19:39:22 +00:00
ParseError ::CantRemoveLastOverlay ( s ) = > * s ,
2022-08-21 14:27:56 +00:00
ParseError ::CantHideDefaultOverlay ( _ , s ) = > * s ,
2022-08-13 14:28:18 +00:00
ParseError ::CantAddOverlayHelp ( _ , s ) = > * s ,
2022-02-21 03:31:50 +00:00
ParseError ::NotFound ( s ) = > * s ,
ParseError ::DuplicateCommandDef ( s ) = > * s ,
ParseError ::UnknownCommand ( s ) = > * s ,
ParseError ::NonUtf8 ( s ) = > * s ,
2022-12-13 12:45:33 +00:00
ParseError ::UnknownFlag ( _ , _ , s , _ ) = > * s ,
2022-03-07 20:08:56 +00:00
ParseError ::RequiredAfterOptional ( _ , s ) = > * s ,
2022-02-21 03:31:50 +00:00
ParseError ::UnknownType ( s ) = > * s ,
ParseError ::MissingFlagParam ( _ , s ) = > * s ,
ParseError ::ShortFlagBatchCantTakeArg ( s ) = > * s ,
ParseError ::MissingPositional ( _ , s , _ ) = > * s ,
ParseError ::KeywordMissingArgument ( _ , _ , s ) = > * s ,
ParseError ::MissingType ( s ) = > * s ,
ParseError ::TypeMismatch ( _ , _ , s ) = > * s ,
ParseError ::MissingRequiredFlag ( _ , s ) = > * s ,
ParseError ::IncompleteMathExpression ( s ) = > * s ,
ParseError ::UnknownState ( _ , s ) = > * s ,
ParseError ::InternalError ( _ , s ) = > * s ,
ParseError ::IncompleteParser ( s ) = > * s ,
ParseError ::RestNeedsName ( s ) = > * s ,
ParseError ::ParameterMismatchType ( _ , _ , _ , s ) = > * s ,
ParseError ::ExtraColumns ( _ , s ) = > * s ,
ParseError ::MissingColumns ( _ , s ) = > * s ,
ParseError ::AssignmentMismatch ( _ , _ , s ) = > * s ,
ParseError ::MissingImportPattern ( s ) = > * s ,
ParseError ::WrongImportPattern ( s ) = > * s ,
ParseError ::ExportNotFound ( s ) = > * s ,
2022-03-25 21:43:46 +00:00
ParseError ::SourcedFileNotFound ( _ , s ) = > * s ,
ParseError ::RegisteredFileNotFound ( _ , s ) = > * s ,
2022-02-21 03:31:50 +00:00
ParseError ::FileNotFound ( _ , s ) = > * s ,
2022-05-07 19:39:22 +00:00
ParseError ::ReadingFile ( _ , s ) = > * s ,
2022-02-21 03:31:50 +00:00
ParseError ::LabeledError ( _ , _ , s ) = > * s ,
2022-12-07 23:02:11 +00:00
ParseError ::ShellAndAnd ( s ) = > * s ,
ParseError ::ShellOrOr ( s ) = > * s ,
ParseError ::ShellErrRedirect ( s ) = > * s ,
ParseError ::ShellOutErrRedirect ( s ) = > * s ,
2022-11-26 21:59:43 +00:00
ParseError ::UnknownOperator ( _ , _ , s ) = > * s ,
2022-12-21 22:21:03 +00:00
ParseError ::NotAConstant ( s ) = > * s ,
2022-02-21 03:31:50 +00:00
}
}
}