Coverage Report

Created: 2021-08-22 09:07

/src/skia/src/sksl/ir/SkSLBreakStatement.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2016 Google Inc.
3
 *
4
 * Use of this source code is governed by a BSD-style license that can be
5
 * found in the LICENSE file.
6
 */
7
8
#ifndef SKSL_BREAKSTATEMENT
9
#define SKSL_BREAKSTATEMENT
10
11
#include "include/private/SkSLStatement.h"
12
#include "src/sksl/ir/SkSLExpression.h"
13
14
namespace SkSL {
15
16
/**
17
 * A 'break' statement.
18
 */
19
class BreakStatement final : public Statement {
20
public:
21
    static constexpr Kind kStatementKind = Kind::kBreak;
22
23
    BreakStatement(int offset)
24
6.12k
    : INHERITED(offset, kStatementKind) {}
25
26
6.03k
    static std::unique_ptr<Statement> Make(int offset) {
27
6.03k
        return std::make_unique<BreakStatement>(offset);
28
6.03k
    }
29
30
87
    std::unique_ptr<Statement> clone() const override {
31
87
        return std::make_unique<BreakStatement>(fOffset);
32
87
    }
33
34
0
    String description() const override {
35
0
        return String("break;");
36
0
    }
37
38
private:
39
    using INHERITED = Statement;
40
};
41
42
}  // namespace SkSL
43
44
#endif