Skip to content

Commit

Permalink
Merge pull request #781 from braddr/fix
Browse files Browse the repository at this point in the history
fix latent bug with Lexer::peek and recently introduced bug in Lexer::scan
  • Loading branch information
WalterBright committed Mar 4, 2012
2 parents dcb113c + 06bf3d3 commit bb06024
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/lexer.c
Expand Up @@ -370,7 +370,6 @@ Token *Lexer::peek(Token *ct)
{
t = new Token();
scan(t);
t->next = NULL;
ct->next = t;
}
return t;
Expand Down Expand Up @@ -1231,7 +1230,7 @@ void Lexer::scan(Token *t)
case '#':
{
p++;
Token *n = peek(&token);
Token *n = peek(t);
if (n->value == TOKidentifier && n->ident == Id::line)
{
nextToken();
Expand Down
1 change: 1 addition & 0 deletions src/lexer.h
Expand Up @@ -252,6 +252,7 @@ struct Token
static const char *tochars[TOKMAX];
static void *operator new(size_t sz);

Token() : next(NULL) {}
int isKeyword();
void print();
const char *toChars();
Expand Down

0 comments on commit bb06024

Please sign in to comment.