blob: 96cb700b14906597fa7a78d3ce264a433857f629 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SKSL_BREAKSTATEMENT
#define SKSL_BREAKSTATEMENT
#include "include/private/SkSLStatement.h"
#include "src/sksl/ir/SkSLExpression.h"
namespace SkSL {
/**
* A 'break' statement.
*/
class BreakStatement final : public Statement {
public:
inline static constexpr Kind kIRNodeKind = Kind::kBreak;
BreakStatement(Position pos)
: INHERITED(pos, kIRNodeKind) {}
static std::unique_ptr<Statement> Make(Position pos) {
return std::make_unique<BreakStatement>(pos);
}
std::unique_ptr<Statement> clone() const override {
return std::make_unique<BreakStatement>(fPosition);
}
std::string description() const override {
return "break;";
}
private:
using INHERITED = Statement;
};
} // namespace SkSL
#endif
|