mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-19 03:20:14 +00:00
Change LineColumn::column to u32 to avoid overflow, and remove LineTooLong error
This commit is contained in:
parent
9b24a4ed9b
commit
650c29de3c
3 changed files with 7 additions and 11 deletions
|
@ -49,7 +49,6 @@ pub enum SyntaxError<'a> {
|
|||
Unexpected(Region),
|
||||
OutdentedTooFar,
|
||||
ConditionFailed,
|
||||
LineTooLong(Position),
|
||||
TooManyLines,
|
||||
Eof(Region),
|
||||
InvalidPattern,
|
||||
|
@ -208,18 +207,16 @@ pub enum EImports {
|
|||
pub enum BadInputError {
|
||||
HasTab,
|
||||
///
|
||||
LineTooLong,
|
||||
TooManyLines,
|
||||
///
|
||||
///
|
||||
BadUtf8,
|
||||
}
|
||||
|
||||
pub fn bad_input_to_syntax_error<'a>(bad_input: BadInputError, pos: Position) -> SyntaxError<'a> {
|
||||
pub fn bad_input_to_syntax_error<'a>(bad_input: BadInputError) -> SyntaxError<'a> {
|
||||
use crate::parser::BadInputError::*;
|
||||
match bad_input {
|
||||
HasTab => SyntaxError::NotYetImplemented("call error on tabs".to_string()),
|
||||
LineTooLong => SyntaxError::LineTooLong(pos),
|
||||
TooManyLines => SyntaxError::TooManyLines,
|
||||
BadUtf8 => SyntaxError::BadUtf8,
|
||||
}
|
||||
|
@ -323,7 +320,6 @@ pub enum EExpr<'a> {
|
|||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum ENumber {
|
||||
End,
|
||||
LineTooLong,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue