2 * Copyright 2016 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef SKSL_BREAKSTATEMENT
9 #define SKSL_BREAKSTATEMENT
11 #include "include/private/SkSLStatement.h"
12 #include "src/sksl/ir/SkSLExpression.h"
17 * A 'break' statement.
19 class BreakStatement final : public Statement {
21 inline static constexpr Kind kStatementKind = Kind::kBreak;
23 BreakStatement(Position pos)
24 : INHERITED(pos, kStatementKind) {}
26 static std::unique_ptr<Statement> Make(Position pos) {
27 return std::make_unique<BreakStatement>(pos);
30 std::unique_ptr<Statement> clone() const override {
31 return std::make_unique<BreakStatement>(fPosition);
34 std::string description() const override {
39 using INHERITED = Statement;