From c6ee98e76b1fa5cbd377e484ba0281cfaecacbdb Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 25 Sep 2021 16:11:02 +0200 Subject: [PATCH] Accept the use of "structure" as an alternative to the "class" keyword --- 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 708beb4..a5e2f96 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -31,7 +31,7 @@ namespace Parser { switch (current.toktype) { case STRING: parseTree << types::String(current.toktext.data()); break; case IDENTIFIER: { - if (current.toktext == "class") { + if (current.toktext == "class" || current.toktext == "structure") { if (next.toktype == IDENTIFIER) { parseTree << Class(next.toktext); ++i; } else throw ParsingException((not (next.toktext.empty() or next.toktype == tok::EOF_)) ? '"' + next.toktext + "\" is not a valid class identifier" : "A class identifier is required", next.line);