Compare commits

..

2 Commits

Author SHA1 Message Date
Gal e89e089af2
Add C style block comments 2024-02-09 01:14:02 +01:00
Gal d3aa8063d2
Add notes 2024-02-09 01:13:41 +01:00
2 changed files with 17 additions and 2 deletions

View File

@ -1,5 +1,8 @@
## Crafting Interpreters
## Notes
https://notes.velouria.dev/Reading/Crafting-Interpreters
### Running
```

View File

@ -81,7 +81,14 @@ class Scanner {
addToken(SEMICOLON);
break;
case '*':
if (match('/') && !isAtEnd()) {
advance();
} else if (isAtEnd()) {
break;
}
else {
addToken(STAR);
}
break;
case '!':
addToken(match('=') ? BANG_EQUAL : BANG);
@ -98,7 +105,12 @@ class Scanner {
if (match('/')) {
while (peek() != '\n' && !isAtEnd())
advance();
} else {
}
else if (match('*')) {
while (peek() != '*')
advance();
}
else {
addToken(SLASH);
}
break;