Clearer errors if we find a class without a known ending.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Deukhoofd 2021-01-02 19:12:31 +01:00
parent df9c4933af
commit 0bacb981d1
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F

View File

@ -137,7 +137,7 @@ namespace MalachScript::Parser {
} }
break; break;
} }
default: return false; default: logError(DiagnosticType::UnexpectedToken, current->GetSpan()); return false;
} }
out = new ParsedClassStatement(TextSpan(start, current->GetSpan().GetEnd()), classAttr, identifier, inherits, out = new ParsedClassStatement(TextSpan(start, current->GetSpan().GetEnd()), classAttr, identifier, inherits,
body); body);