diff --git a/src/macro/MacroDriver.cc b/src/macro/MacroDriver.cc
index 017cd95bc349b58726d2c35c96003e149475bbe2..4142030c9ad74a3ea9729c79410624fa2497c5a3 100644
--- a/src/macro/MacroDriver.cc
+++ b/src/macro/MacroDriver.cc
@@ -323,7 +323,7 @@ MacroDriver::possibly_add_comprehension_element(vector<MacroValuePtr> &v, MacroV
 {
   auto ival = dynamic_pointer_cast<IntMV>(test_expr);
   if (!ival)
-    throw MacroValue::TypeError("In a comprehension, the expression after the 'if' must evaluate to an integer");
+    throw MacroValue::TypeError("In a comprehension, the expression after the semicolon must evaluate to an integer");
   if (ival->value)
     {
       assert(!comprehension_stack.empty());
diff --git a/src/macro/MacroDriver.hh b/src/macro/MacroDriver.hh
index db6f42a434d84f9b6858145ae9ff5da8cee1c5a5..d0888c9f9b5603f805f9a836821ab6235f63136c 100644
--- a/src/macro/MacroDriver.hh
+++ b/src/macro/MacroDriver.hh
@@ -129,11 +129,17 @@ private:
   //! Set to true while parsing an IF statement (only the statement, not the body)
   bool reading_if_statement;
 
+  //! Set to true while parsing the comprehension in a new buffer
   bool is_comprehension_context{false};
+  //! Counter for the current comprehension
   int comprehension_iter_nb{0};
+  //! The lexer start condition (EXPR or STMT) before entering the comprehension
   int comprehension_start_condition;
+  //! Number of nested comprehensions, used during the construction of the new lexer buffer
   int nested_comprehension_nb{0};
+  //! Temporary stores for the new lexer buffer
   string comprehension_clause, comprehension_clause_tmp;
+  //! Stores for the location of the comprehension clause
   Macro::parser::location_type comprehension_clause_loc, comprehension_clause_loc_tmp;
 
   //! Output the @#line declaration
@@ -266,9 +272,13 @@ public:
       in that case it destroys the pointer given to init_loop() */
   bool iter_loop() noexcept(false);
 
+  //! Initializes the evaluation of a comprehension
   void init_comprehension(const vector<string> &names, MacroValuePtr value);
+  //! Iterates during the evaluation of the comprehension
   void iter_comprehension();
+  //! Helper to construct the value corresponding to the comprehension
   void possibly_add_comprehension_element(vector<MacroValuePtr> &v, MacroValuePtr test_expr) const;
+  //! Returns the size of the set over which the current comprehension iterates
   int get_comprehension_iter_nb() const;
 
   //! Begins an @#if statement