fork download
  1. Token Lexer::lex() {
  2. ++current_;
  3.  
  4. if (current_ >= end_) {
  5. return Token(Token::Type::EndOfFile, get_current_location_());
  6. }
  7.  
  8. if (std::isspace(*current_) && *current_ != '\n') {
  9. return lex();
  10. }
  11.  
  12. if (*current_ == '\n') {
  13. return Token(Token::Type::EndOfLine, get_current_location_());
  14. }
  15.  
  16. return Token(Token::Type::Unknown, get_current_location_());
  17. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty