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_CONTINUESTATEMENT 9 #define SKSL_CONTINUESTATEMENT 10 11 #include "include/private/SkSLStatement.h" 12 #include "src/sksl/ir/SkSLExpression.h" 13 14 namespace SkSL { 15 16 /** 17 * A 'continue' statement. 18 */ 19 class ContinueStatement final : public Statement { 20 public: 21 inline static constexpr Kind kStatementKind = Kind::kContinue; 22 ContinueStatement(int line)23 ContinueStatement(int line) 24 : INHERITED(line, kStatementKind) {} 25 Make(int line)26 static std::unique_ptr<Statement> Make(int line) { 27 return std::make_unique<ContinueStatement>(line); 28 } 29 clone()30 std::unique_ptr<Statement> clone() const override { 31 return std::make_unique<ContinueStatement>(fLine); 32 } 33 description()34 String description() const override { 35 return String("continue;"); 36 } 37 38 private: 39 using INHERITED = Statement; 40 }; 41 42 } // namespace SkSL 43 44 #endif 45