macro processor: comment If class

issue#70
Houtan Bastani 2019-08-21 18:03:51 +02:00
parent 4594fdd0fd
commit 92f18f58f5
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 8 additions and 0 deletions

View File

@ -173,6 +173,14 @@ namespace macro
class If : public Directive
{
protected:
/* Every if statement and the associated body to execute are stored in a
* pair<ExpressionPtr, vector<DirectivePtr>>, where the ExpressionPtr is the condition
* and vector<DirectivePtr> is the series of statements to execute if the condition evaluates
* to true.
* The `if` statement is the first element in the vector
* If there exist any `elseif` statements, they follow
* If there is an `else` statement it is the last element in the vector. Its condition is true.
*/
const vector<pair<ExpressionPtr, vector<DirectivePtr>>> expr_and_body;
public:
If(vector<pair<ExpressionPtr, vector<DirectivePtr>>> expr_and_body_arg,