mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* use new formatter for ERROR_PRINT, added ERROR_PRINTLN * remove old log define * fix comments
33 lines
943 B
C++
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
|