polserver/pol-core/bscript/compiler/ast/IfThenElseStatement.h
turleypol 0e675c516a
use new formatter for ERROR_PRINT, added ERROR_PRINTLN (#595)
* use new formatter for ERROR_PRINT, added ERROR_PRINTLN

* remove old log define

* fix comments
2024-01-12 06:51:44 +01:00

33 lines
943 B
C++

#ifndef POLSERVER_IFTHENELSESTATEMENT_H
#define POLSERVER_IFTHENELSESTATEMENT_H
#include "bscript/compiler/ast/Statement.h"
namespace Pol::Bscript::Compiler
{
class Block;
class BranchSelector;
class Expression;
class IfThenElseStatement : public Statement
{
public:
IfThenElseStatement( const SourceLocation&, std::unique_ptr<BranchSelector>,
std::unique_ptr<Block> consequent, std::unique_ptr<Node> alternative );
IfThenElseStatement( const SourceLocation&, std::unique_ptr<BranchSelector>,
std::unique_ptr<Block> consequent );
void accept( NodeVisitor& visitor ) override;
void describe_to( std::string& ) const override;
BranchSelector& branch_selector();
Block& consequent();
Node* alternative();
std::unique_ptr<Block> take_consequent();
std::unique_ptr<Node> take_alternative();
};
} // namespace Pol::Bscript::Compiler
#endif // POLSERVER_IFTHENELSESTATEMENT_H