Skip to content

Commit 722e447

Browse files
committed
Small fixes to a few comments
1 parent 8008333 commit 722e447

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lexer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ def peek_word_ahead(self):
157157
peeked_word = ""
158158
current_index = self.position.index + 1
159159

160-
# Skip white spaces
160+
# Skip leading white space
161161
if self.input_string[current_index] == ' ':
162162
peeked_word += ' '
163163
current_index += 1
164164

165-
# Loop until white space or escape character is found
165+
# Loop until next white space or escape character is found
166166
while (current_index < len(self.input_string)) and (self.input_string[current_index] not in ESCAPE_DICTIONARY):
167167
peeked_word += self.input_string[current_index]
168168
current_index += 1

text_input.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
if 2 + 2 is equal to 4
2-
abe42 is 69
3-
2 is less than 5
4-
69 is greater than or equal to 42
1+
(2+3)*2
2+

0 commit comments

Comments
 (0)