From 5c1f937a7eb7a9cc9cd86cb69b3263f41f24408f Mon Sep 17 00:00:00 2001 From: Cori Barker Date: Sun, 22 Feb 2026 22:24:27 +0000 Subject: Partially completed lots of changes, refactoring most of the files --- include/lexer.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/lexer.hpp (limited to 'include/lexer.hpp') diff --git a/include/lexer.hpp b/include/lexer.hpp new file mode 100644 index 0000000..2ef9700 --- /dev/null +++ b/include/lexer.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "token.hpp" + +#include +#include + +class Lexer { +public: + explicit Lexer (const std::string& src); + + std::vector tokenise(); + +private: + int line; + int column; + int position; + std::string src; + std::vector tokens; + + char advance(); + void skipWhitespace(); + void skipComment(); +}; -- cgit v1.2.3