Comments, var access, start on objects

This commit is contained in:
2025-10-26 19:16:35 +11:00
parent c73142178a
commit 191410d174
4 changed files with 30 additions and 15 deletions

View File

@@ -60,6 +60,10 @@ Lexer::Lexer(std::string in) : file(std::move(in)) {
if (!buf.empty()) content.push_back(buf);
if (c.value() != ' ') content.emplace_back(1, c.value());
buf.clear();
} else if (c.value() == '/' && peek(0).has_value() && peek(0).value() == '/') {
while (c.has_value() && c.value() != '\n') {
c = consume();
}
} else {
buf += c.value();
}