From b1162ed1df3055d6748c94423f01fe07d8ebc5bd Mon Sep 17 00:00:00 2001 From: SingularityT3 <44658109+SingularityT3@users.noreply.github.com> Date: Sat, 25 Feb 2023 16:27:11 +0530 Subject: [PATCH] Allow newline after TYPE --- src/parser/userType.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/parser/userType.cpp b/src/parser/userType.cpp index e40b762..df62671 100644 --- a/src/parser/userType.cpp +++ b/src/parser/userType.cpp @@ -6,6 +6,8 @@ Node *Parser::parseType() { const Token &token = *currentToken; advance(); + while (currentToken->type == TokenType::LINE_END) advance(); + const Token &identifier = *currentToken; if (identifier.type != TokenType::IDENTIFIER) throw PSC::ExpectedTokenError(*currentToken, "identifier");