From f2338f1d137b6651cd6a1a04850ded108b8d37ba Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:38:53 +0200 Subject: [PATCH] Allow "long unsigned" type --- oscar64/Parser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oscar64/Parser.cpp b/oscar64/Parser.cpp index a57d780..e879e02 100644 --- a/oscar64/Parser.cpp +++ b/oscar64/Parser.cpp @@ -767,8 +767,13 @@ Declaration* Parser::ParseBaseTypeDeclaration(uint64 flags, bool qualified, Decl case TK_LONG: dec = new Declaration(mScanner->mLocation, DT_TYPE_INTEGER); dec->mSize = 4; - dec->mFlags = flags | DTF_DEFINED | DTF_SIGNED; mScanner->NextToken(); + if (ConsumeTokenIf(TK_UNSIGNED)) + dec->mFlags = flags | DTF_DEFINED; + else if (ConsumeTokenIf(TK_SIGNED)) + dec->mFlags = flags | DTF_DEFINED | DTF_SIGNED; + else + dec->mFlags = flags | DTF_DEFINED | DTF_SIGNED; break; case TK_SHORT: