Implements statblock for functions.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
bfb47d9b5f
commit
09023d6337
|
@ -222,8 +222,11 @@ namespace MalachScript::Parser {
|
|||
ParseFuncAttr(funcAttr, current);
|
||||
const ParsedStatement* statblock = nullptr;
|
||||
if (current->GetKind() != LexTokenKind::SemicolonSymbol) {
|
||||
// TODO: Parse stat block.
|
||||
throw std::logic_error("not implemented");
|
||||
if (!ParseStatBlock(statblock, current)) {
|
||||
LogError(Diagnostics::DiagnosticType::UnexpectedToken, current->GetSpan());
|
||||
}
|
||||
} else {
|
||||
PROGRESS_TOKEN(current);
|
||||
}
|
||||
out = new ParsedFuncStatement(TextSpan(start, current->GetSpan().GetEnd()), isShared, isExternal,
|
||||
accessModifier, typeStatement, returnsReference, identifier, paramList, isConst,
|
||||
|
|
|
@ -130,7 +130,7 @@ PARSER_TEST(
|
|||
REQUIRE(virtPropStatement->GetSetStatement() == nullptr);
|
||||
})
|
||||
|
||||
/// Parse class foobar {
|
||||
/// class foobar {
|
||||
// int i;
|
||||
// bool foo {
|
||||
// get {
|
||||
|
|
Loading…
Reference in New Issue