From cca696b27a7271251291cf42b2c29b35b8a41455 Mon Sep 17 00:00:00 2001 From: Username404 Date: Fri, 4 Mar 2022 19:30:58 +0100 Subject: [PATCH] Fix the line number of next in Parser.hpp Signed-off-by: Username404 --- src/headers/parsing/Parser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index dc4e35c..69ac05e 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -33,7 +33,7 @@ namespace Parser { }; for (;i < lexed.size(); ++i) { const bool hasNext = (i + 1) < lexed.size(); - const tok& current = lexed[i], next = hasNext ? lexed[i + 1] : tok(UNEXPECTED); + const tok& current = lexed[i], next = hasNext ? lexed[i + 1] : tok(UNEXPECTED, current.line); switch (current.toktype) { case STRING: parseTree << types::String(current.toktext.data()); break;