Continue removing MyError.

This commit is contained in:
Tom Alexander
2023-10-17 10:09:37 -04:00
parent c9d7251e3b
commit 77e6c22ad8
29 changed files with 84 additions and 128 deletions

View File

@@ -231,9 +231,9 @@ fn _script_with_braces_end<'b, 'g, 'r, 's>(
let current_depth = input.get_brace_depth() - starting_brace_depth;
if current_depth > 0 {
// Its impossible for the next character to end the subscript or superscript if we're any amount of braces deep
return Err(nom::Err::Error(CustomError::MyError(MyError(
return Err(nom::Err::Error(CustomError::Static(
"Not a valid end for subscript or superscript.",
))));
)));
}
if current_depth < 0 {
// This shouldn't be possible because if depth is 0 then a closing brace should end the subscript or superscript.
@@ -286,7 +286,7 @@ fn _script_with_parenthesis_end<'s>(
return close_parenthesis;
}
}
Err(nom::Err::Error(CustomError::MyError(MyError(
Err(nom::Err::Error(CustomError::Static(
"No script parenthesis end.",
))))
)))
}