mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Add semantic::Statement::Block() for getting the owning BlockStatement
Required special casing the ElseStatement, as this isn't actually owned by a BlockStatement. Change-Id: Ic33c207598b838a12b865a7694e596b2629c9208 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/46443 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
285b8b6e75
commit
dba65b7a34
@@ -65,6 +65,9 @@ class BlockStatement : public Castable<BlockStatement, Statement> {
|
||||
/// @returns the ending iterator
|
||||
StatementList::const_iterator end() const { return statements_.end(); }
|
||||
|
||||
/// @returns the statement list
|
||||
const StatementList& statements() const { return statements_; }
|
||||
|
||||
/// Clones this node and all transitive child nodes using the `CloneContext`
|
||||
/// `ctx`.
|
||||
/// @param ctx the clone context
|
||||
|
||||
Reference in New Issue
Block a user