@@ -29,7 +29,7 @@ pub enum LexicalErrorType {
29
29
UnrecognizedToken { tok : char } ,
30
30
FStringError ( FStringErrorType ) ,
31
31
LineContinuationError ,
32
- EOF ,
32
+ Eof ,
33
33
OtherError ( String ) ,
34
34
}
35
35
@@ -64,7 +64,7 @@ impl fmt::Display for LexicalErrorType {
64
64
LexicalErrorType :: LineContinuationError => {
65
65
write ! ( f, "unexpected character after line continuation character" )
66
66
}
67
- LexicalErrorType :: EOF => write ! ( f, "unexpected EOF while parsing" ) ,
67
+ LexicalErrorType :: Eof => write ! ( f, "unexpected EOF while parsing" ) ,
68
68
LexicalErrorType :: OtherError ( msg) => write ! ( f, "{}" , msg) ,
69
69
}
70
70
}
@@ -129,7 +129,7 @@ pub struct ParseError {
129
129
#[ derive( Debug , PartialEq ) ]
130
130
pub enum ParseErrorType {
131
131
/// Parser encountered an unexpected end of input
132
- EOF ,
132
+ Eof ,
133
133
/// Parser encountered an extra token
134
134
ExtraToken ( Tok ) ,
135
135
/// Parser encountered an invalid token
@@ -146,7 +146,7 @@ impl From<LalrpopError<Location, Tok, LexicalError>> for ParseError {
146
146
match err {
147
147
// TODO: Are there cases where this isn't an EOF?
148
148
LalrpopError :: InvalidToken { location } => ParseError {
149
- error : ParseErrorType :: EOF ,
149
+ error : ParseErrorType :: Eof ,
150
150
location,
151
151
} ,
152
152
LalrpopError :: ExtraToken { token } => ParseError {
@@ -171,7 +171,7 @@ impl From<LalrpopError<Location, Tok, LexicalError>> for ParseError {
171
171
}
172
172
}
173
173
LalrpopError :: UnrecognizedEOF { location, .. } => ParseError {
174
- error : ParseErrorType :: EOF ,
174
+ error : ParseErrorType :: Eof ,
175
175
location,
176
176
} ,
177
177
}
@@ -187,7 +187,7 @@ impl fmt::Display for ParseError {
187
187
impl fmt:: Display for ParseErrorType {
188
188
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
189
189
match * self {
190
- ParseErrorType :: EOF => write ! ( f, "Got unexpected EOF" ) ,
190
+ ParseErrorType :: Eof => write ! ( f, "Got unexpected EOF" ) ,
191
191
ParseErrorType :: ExtraToken ( ref tok) => write ! ( f, "Got extraneous token: {:?}" , tok) ,
192
192
ParseErrorType :: InvalidToken => write ! ( f, "Got invalid token" ) ,
193
193
ParseErrorType :: UnrecognizedToken ( ref tok, ref expected) => {
0 commit comments