just/src/compile_error_kind.rs

133 lines
2.5 KiB
Rust
Raw Normal View History

use super::*;
#[derive(Debug, PartialEq)]
pub(crate) enum CompileErrorKind<'src> {
AliasInvalidAttribute {
alias: &'src str,
attribute: Attribute<'src>,
},
AliasShadowsRecipe {
alias: &'src str,
recipe_line: usize,
},
2024-05-25 00:32:25 -07:00
AttributeArgumentCountMismatch {
attribute: &'src str,
found: usize,
min: usize,
max: usize,
},
BacktickShebang,
CircularRecipeDependency {
recipe: &'src str,
circle: Vec<&'src str>,
},
CircularVariableDependency {
variable: &'src str,
circle: Vec<&'src str>,
},
DependencyArgumentCountMismatch {
dependency: &'src str,
found: usize,
min: usize,
max: usize,
},
2023-12-27 20:27:15 -08:00
Redefinition {
first: usize,
2023-12-27 20:27:15 -08:00
first_type: &'static str,
name: &'src str,
second_type: &'static str,
},
DuplicateAttribute {
attribute: &'src str,
first: usize,
},
DuplicateParameter {
recipe: &'src str,
parameter: &'src str,
},
DuplicateSet {
setting: &'src str,
first: usize,
},
DuplicateVariable {
variable: &'src str,
},
ExpectedKeyword {
expected: Vec<Keyword>,
found: Token<'src>,
},
ExtraLeadingWhitespace,
FunctionArgumentCountMismatch {
function: &'src str,
found: usize,
expected: Range<usize>,
},
Include,
InconsistentLeadingWhitespace {
expected: &'src str,
found: &'src str,
},
Internal {
message: String,
},
InvalidEscapeSequence {
character: char,
},
MismatchedClosingDelimiter {
close: Delimiter,
open: Delimiter,
open_line: usize,
},
MixedLeadingWhitespace {
whitespace: &'src str,
},
ParameterFollowsVariadicParameter {
parameter: &'src str,
},
ParsingRecursionDepthExceeded,
RequiredParameterFollowsDefaultParameter {
parameter: &'src str,
},
2024-05-18 22:41:38 -07:00
ShellExpansion {
err: shellexpand::LookupError<env::VarError>,
},
UndefinedVariable {
variable: &'src str,
},
UnexpectedCharacter {
expected: char,
},
UnexpectedClosingDelimiter {
close: Delimiter,
},
UnexpectedEndOfToken {
expected: char,
},
UnexpectedToken {
expected: Vec<TokenKind>,
found: TokenKind,
},
UnknownAliasTarget {
alias: &'src str,
target: &'src str,
},
UnknownAttribute {
attribute: &'src str,
},
UnknownDependency {
recipe: &'src str,
unknown: &'src str,
},
UnknownFunction {
function: &'src str,
},
UnknownSetting {
setting: &'src str,
},
UnknownStartOfToken,
UnpairedCarriageReturn,
UnterminatedBacktick,
UnterminatedInterpolation,
UnterminatedString,
}