================ @@ -79,8 +79,24 @@ enum class StringLiteralKind; // AST classes for statements. //===----------------------------------------------------------------------===// -/// Stmt - This represents one statement. +/// A statement or expression in the program. /// +/// This is the base for the hierarchy of statements (ForStmt, ReturnStmt...) +/// as well as expressions (Expr, CastExpr, IntegerLiteral...). +/// Classing expressions as Stmt allows them to appear as statements without +/// needing an extra "expression-statement" node. +/// +/// Statements can have children and so form trees. e.g. `while (i>0) i--;` +/// +/// WhileStmt +/// |-BinaryOperator > +/// | |-DeclRefExpr i +/// | `-IntegerLiteral 0 +/// `-UnaryOperator -- +/// DeclRefExpr i +/// ---------------- zwuis wrote:
We can use `\code` and `\endcode` commands for code block so that it is treated as code instead of text by doxygen. ```cpp /// \code /// WhileStmt /// |-BinaryOperator > /// ... /// \endcode ``` https://github.com/llvm/llvm-project/pull/109795 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits