Skip to content

Commit b92f603

Browse files
authored
Update TokenStream.java
final try before i ask for some help, i think i wrote the package wrong. but i am not seeing much from the failed tests :///
1 parent e74bf8e commit b92f603

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/scanner/project/TokenStream.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ public Token nextToken() { // Main function of the scanner
8383
}
8484
return t;
8585
case '=':
86-
// ==
86+
// == or single = (which is Other/invalid in KAY)
8787
nextChar = readChar();
8888
if (nextChar == '=') {
8989
t.setValue(t.getValue() + nextChar);
9090
nextChar = readChar();
9191
} else {
92-
// Single '=' is not a valid operator in KAY, mark as Other
92+
// Single '=' is not a valid operator in KAY
9393
t.setType("Other");
9494
}
9595
return t;
@@ -142,7 +142,7 @@ public Token nextToken() { // Main function of the scanner
142142
}
143143
}
144144

145-
// Then check for a separator (including comma)
145+
// Then check for a separator (including comma for multi-variable declarations)
146146
if (isSeparator(nextChar)) {
147147
t.setType("Separator");
148148
t.setValue(t.getValue() + nextChar);

0 commit comments

Comments
 (0)