Skip to content

Commit

Permalink
Fixes lexer last token handling
Browse files Browse the repository at this point in the history
  • Loading branch information
psde committed Jan 17, 2013
1 parent 8fb84ff commit 8a9b785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "Lexer.hpp"

#ifdef _DEBUG
#ifndef _DEBUG
#define LEXER_DEBUG
#endif

Expand Down Expand Up @@ -158,7 +158,7 @@ Token Lexer::nextToken()
{
Token token;

if(this->buffer->peekChar() == 0x00)
if(currentChar /*this->buffer->peekChar()*/ == 0x00)
{
token.setType(Token::TOKEN_EOF);
token.setPosition(this->pos.line, this->pos.column);
Expand All @@ -172,7 +172,7 @@ Token Lexer::nextToken()
{
if(currentChar == '*' && this->buffer->peekChar() == '/')
{
// do this twice, so that ')' is not the current char anymore
// do this twice, so that '/' is not the current char anymore
this->getChar();
this->getChar();
while(isspace(currentChar))
Expand Down

0 comments on commit 8a9b785

Please sign in to comment.