@@ -12,8 +12,10 @@
namespace Cpp {
-Lexer::Lexer(StringView const& input)
+Lexer::Lexer(StringView const& input, size_t start_line)
: m_input(input)
+ , m_previous_position { start_line, 0 }
+ , m_position { start_line, 0 }
{
}
@@ -14,7 +14,7 @@ namespace Cpp {
class Lexer {
public:
- Lexer(StringView const&);
+ explicit Lexer(StringView const&, size_t start_line = 0);
Vector<Token> lex();