minor changes

This commit is contained in:
2026-06-24 23:04:58 +03:00
parent eb85acf224
commit 57eb4450af
2 changed files with 22 additions and 1 deletions
+21
View File
@@ -1,2 +1,23 @@
#pragma once #pragma once
#include <string>
namespace lexer {
// controlled character stream access
class Cursor {
private:
const std::string &source;
int position; // current index in string
int line; // current index of line
int column; //
public:
char current(); // returns current symbol
char peek(int offset); //
void advance();
bool eol() const;
bool eof() const;
};
}
+1 -1
View File
@@ -6,7 +6,7 @@
namespace lexer { namespace lexer {
struct Token { struct Token {
TokenKind kind; TokenKind kind;
std::string lexeme; std::string value;
int line; int line;
int column; int column;