This commit is contained in:
2025-12-19 20:38:40 +08:00
commit 73c828d99b
83 changed files with 13068 additions and 0 deletions

46
include/Ast/ControlSt.hpp Normal file
View File

@@ -0,0 +1,46 @@
#pragma once
#include <Ast/astBase.hpp>
namespace Fig::Ast
{
class ReturnSt final : public StatementAst
{
public:
Expression retValue;
ReturnSt()
{
type = AstType::ReturnSt;
}
ReturnSt(Expression _retValue) :
retValue(_retValue)
{
type = AstType::ReturnSt;
}
};
using Return = std::shared_ptr<ReturnSt>;
class BreakSt final : public StatementAst
{
public:
BreakSt()
{
type = AstType::BreakSt;
}
};
using Break = std::shared_ptr<BreakSt>;
class ContinueSt final : public StatementAst
{
public:
ContinueSt()
{
type = AstType::ContinueSt;
}
};
using Continue = std::shared_ptr<ContinueSt>;
};