Fix the line number of next in Parser.hpp

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2022-03-04 19:30:58 +01:00
parent 26d88c2f91
commit cca696b27a
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -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;