From 50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 1 Dec 2016 07:22:35 -0700 Subject: New layout for the parser, it doesn't parse yet. --- src/lexer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lexer.cpp') diff --git a/src/lexer.cpp b/src/lexer.cpp index 55d155d..538e088 100644 --- a/src/lexer.cpp +++ b/src/lexer.cpp @@ -24,17 +24,17 @@ Lexer::~Lexer() { } -void Lexer::nextToken() +void Lexer::nextToken( int iCount ) { - if( iLookAheadUsed <= 1 ) + if( iLookAheadUsed-iCount <= 0 ) { iLookAheadUsed = 0; iLookAheadStart = 0; } else { - iLookAheadStart = (iLookAheadStart+1)%iLookAheadSize; - iLookAheadUsed--; + iLookAheadStart = (iLookAheadStart+iCount)%iLookAheadSize; + iLookAheadUsed -= iCount; } } -- cgit v1.2.3