File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -389,17 +389,17 @@ impl Lexer {
389389 Ok ( self . token )
390390 }
391391
392+ #[ deprecated(
393+ since = "0.1.0" ,
394+ note = "This function returns the next token, not the current token. Use `next_token` instead of this."
395+ ) ]
392396 /// Get the current token.
393397 pub ( crate ) fn token ( & mut self ) -> Result < Option < Token > > {
394- // TODO: This shouldn't be used, next_token should be used instead.
395- // This gives a wrong meaning to what is happening. next_token is more
396- // verbose.
397398 Ok ( self . next_token ( ) ?)
398399 }
399400
400401 /// Consumes last set token and moves onto the next token in buffer.
401402 pub ( crate ) fn consume ( & mut self , token : Token ) -> Result < ( ) > {
402- // TODO: use Lexer::is_token?
403403 if let Some ( last_token) = & self . token {
404404 assert_eq ! (
405405 token, * last_token,
Original file line number Diff line number Diff line change @@ -716,9 +716,6 @@ impl Parser {
716716 ) ;
717717 let mut imports = Vec :: new ( ) ;
718718
719- // TODO: Move this entirely in parse_module, parse_module should return
720- // a Qast and it can recursively call itself when `module` is seen
721- // inside the file.
722719 self . lexer . next_token ( ) ?;
723720 loop {
724721 if self . lexer . token . is_none ( ) {
@@ -816,7 +813,6 @@ impl Parser {
816813 // Here and in the cyclic import case as well.
817814 let err: QccError = QccErrorKind :: UnknownImport . into ( ) ;
818815 err. report ( & function) ;
819- // err.report(format!("{} {}", function, self.lexer.location).as_str());
820816 Err ( QccErrorKind :: ParseError ) ?
821817 }
822818 }
You can’t perform that action at this time.
0 commit comments