Flutter Engine
The Flutter Engine
SkSLNop.h
Go to the documentation of this file.
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_NOP
9#define SKSL_NOP
10
13
14namespace SkSL {
15
16/**
17 * A no-op statement that does nothing.
18 */
19class Nop final : public Statement {
20public:
21 inline static constexpr Kind kIRNodeKind = Kind::kNop;
22
25
26 static std::unique_ptr<Statement> Make() {
27 return std::make_unique<Nop>();
28 }
29
30 bool isEmpty() const override {
31 return true;
32 }
33
34 std::string description() const override {
35 return ";";
36 }
37
38private:
39 using INHERITED = Statement;
40};
41
42} // namespace SkSL
43
44#endif
bool isEmpty() const override
Definition: SkSLNop.h:30
static std::unique_ptr< Statement > Make()
Definition: SkSLNop.h:26
std::string description() const override
Definition: SkSLNop.h:34
static constexpr Kind kIRNodeKind
Definition: SkSLNop.h:21
Statement(Position pos, Kind kind)
Definition: SkSLStatement.h:23
StatementKind
Definition: SkSLIRNode.h:43