Add missing doc comments.

This cl adds some missing doc comments.

Change-Id: Ic5452c2f9a40ddcc4642062a338f602632f3e057
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27520
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
This commit is contained in:
dan sinclair 2020-08-26 20:38:46 +00:00 committed by Commit Bot service account
parent 63b007d34f
commit 8d72a2bc4e
2 changed files with 21 additions and 13 deletions

View File

@ -1991,12 +1991,12 @@ std::unique_ptr<ast::LoopStatement> ParserImpl::loop_stmt() {
std::move(continuing)); std::move(continuing));
} }
ForHeader::ForHeader(std::unique_ptr<ast::Statement> _initializer, ForHeader::ForHeader(std::unique_ptr<ast::Statement> init,
std::unique_ptr<ast::Expression> _condition, std::unique_ptr<ast::Expression> cond,
std::unique_ptr<ast::Statement> _continuing) std::unique_ptr<ast::Statement> cont)
: initializer(std::move(_initializer)), : initializer(std::move(init)),
condition(std::move(_condition)), condition(std::move(cond)),
continuing(std::move(_continuing)) {} continuing(std::move(cont)) {}
ForHeader::~ForHeader() = default; ForHeader::~ForHeader() = default;

View File

@ -52,16 +52,24 @@ namespace wgsl {
class Lexer; class Lexer;
/// Struct holding information for a for loop
struct ForHeader { struct ForHeader {
std::unique_ptr<ast::Statement> initializer; /// Constructor
std::unique_ptr<ast::Expression> condition; /// @param init the initializer statement
std::unique_ptr<ast::Statement> continuing; /// @param cond the condition statement
/// @param cont the continuing statement
ForHeader(std::unique_ptr<ast::Statement> _initializer, ForHeader(std::unique_ptr<ast::Statement> init,
std::unique_ptr<ast::Expression> _condition, std::unique_ptr<ast::Expression> cond,
std::unique_ptr<ast::Statement> _continuing); std::unique_ptr<ast::Statement> cont);
~ForHeader(); ~ForHeader();
/// The for loop initializer
std::unique_ptr<ast::Statement> initializer;
/// The for loop condition
std::unique_ptr<ast::Expression> condition;
/// The for loop continuing statement
std::unique_ptr<ast::Statement> continuing;
}; };
/// ParserImpl for WGSL source data /// ParserImpl for WGSL source data