@@ -29,7 +29,7 @@ pub enum LexicalErrorType {
2929 UnrecognizedToken { tok : char } ,
3030 FStringError ( FStringErrorType ) ,
3131 LineContinuationError ,
32- EOF ,
32+ Eof ,
3333 OtherError ( String ) ,
3434}
3535
@@ -64,7 +64,7 @@ impl fmt::Display for LexicalErrorType {
6464 LexicalErrorType :: LineContinuationError => {
6565 write ! ( f, "unexpected character after line continuation character" )
6666 }
67- LexicalErrorType :: EOF => write ! ( f, "unexpected EOF while parsing" ) ,
67+ LexicalErrorType :: Eof => write ! ( f, "unexpected EOF while parsing" ) ,
6868 LexicalErrorType :: OtherError ( msg) => write ! ( f, "{}" , msg) ,
6969 }
7070 }
@@ -129,7 +129,7 @@ pub struct ParseError {
129129#[ derive( Debug , PartialEq ) ]
130130pub enum ParseErrorType {
131131 /// Parser encountered an unexpected end of input
132- EOF ,
132+ Eof ,
133133 /// Parser encountered an extra token
134134 ExtraToken ( Tok ) ,
135135 /// Parser encountered an invalid token
@@ -146,7 +146,7 @@ impl From<LalrpopError<Location, Tok, LexicalError>> for ParseError {
146146 match err {
147147 // TODO: Are there cases where this isn't an EOF?
148148 LalrpopError :: InvalidToken { location } => ParseError {
149- error : ParseErrorType :: EOF ,
149+ error : ParseErrorType :: Eof ,
150150 location,
151151 } ,
152152 LalrpopError :: ExtraToken { token } => ParseError {
@@ -171,7 +171,7 @@ impl From<LalrpopError<Location, Tok, LexicalError>> for ParseError {
171171 }
172172 }
173173 LalrpopError :: UnrecognizedEOF { location, .. } => ParseError {
174- error : ParseErrorType :: EOF ,
174+ error : ParseErrorType :: Eof ,
175175 location,
176176 } ,
177177 }
@@ -187,7 +187,7 @@ impl fmt::Display for ParseError {
187187impl fmt:: Display for ParseErrorType {
188188 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
189189 match * self {
190- ParseErrorType :: EOF => write ! ( f, "Got unexpected EOF" ) ,
190+ ParseErrorType :: Eof => write ! ( f, "Got unexpected EOF" ) ,
191191 ParseErrorType :: ExtraToken ( ref tok) => write ! ( f, "Got extraneous token: {:?}" , tok) ,
192192 ParseErrorType :: InvalidToken => write ! ( f, "Got invalid token" ) ,
193193 ParseErrorType :: UnrecognizedToken ( ref tok, ref expected) => {
0 commit comments