Lots more tests for function statements, fixes several bugs.
This commit is contained in:
@@ -106,7 +106,7 @@ namespace MalachScript::Parser {
|
||||
class ParsedParameter {
|
||||
private:
|
||||
const ParsedTypeStatement* _typeStatement = nullptr;
|
||||
TypeMod _typeMod;
|
||||
TypeMod _typeMod = TypeMod::None;
|
||||
Identifier _identifier;
|
||||
const ParsedExpression* _defaultExpression = nullptr;
|
||||
|
||||
@@ -132,6 +132,8 @@ namespace MalachScript::Parser {
|
||||
public:
|
||||
ParsedParamListStatement(TextSpan span, std::vector<ParsedParameter> parameters)
|
||||
: ParsedStatementImpl<ParsedStatementKind::ParamList>(span), _parameters(std::move(parameters)){};
|
||||
|
||||
[[nodiscard]] const std::vector<ParsedParameter>& GetParameters() const noexcept { return _parameters; }
|
||||
};
|
||||
|
||||
class ParsedFuncStatement : public ParsedStatementImpl<ParsedStatementKind::Func> {
|
||||
|
||||
Reference in New Issue
Block a user