diff options
author | Mike Buland <eichlan@xagasoft.com> | 2016-12-01 07:22:35 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2016-12-01 07:22:35 -0700 |
commit | 50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b (patch) | |
tree | c793699ba61cb56d5415f09ed5469b13a6d36f19 /src/lexer.cpp | |
parent | 2297488eae424197dce4ed6b1dc50ae67c093074 (diff) | |
download | clic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.tar.gz clic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.tar.bz2 clic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.tar.xz clic-50c6956d99b4ee2cf3d003e5918e84b9d1a08f1b.zip |
New layout for the parser, it doesn't parse yet.
Diffstat (limited to 'src/lexer.cpp')
-rw-r--r-- | src/lexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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() | |||
24 | { | 24 | { |
25 | } | 25 | } |
26 | 26 | ||
27 | void Lexer::nextToken() | 27 | void Lexer::nextToken( int iCount ) |
28 | { | 28 | { |
29 | if( iLookAheadUsed <= 1 ) | 29 | if( iLookAheadUsed-iCount <= 0 ) |
30 | { | 30 | { |
31 | iLookAheadUsed = 0; | 31 | iLookAheadUsed = 0; |
32 | iLookAheadStart = 0; | 32 | iLookAheadStart = 0; |
33 | } | 33 | } |
34 | else | 34 | else |
35 | { | 35 | { |
36 | iLookAheadStart = (iLookAheadStart+1)%iLookAheadSize; | 36 | iLookAheadStart = (iLookAheadStart+iCount)%iLookAheadSize; |
37 | iLookAheadUsed--; | 37 | iLookAheadUsed -= iCount; |
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||