Chromium Code Reviews| Index: src/sksl/ir/SkSLFunctionReference.h |
| diff --git a/src/sksl/ir/SkSLFunctionReference.h b/src/sksl/ir/SkSLFunctionReference.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d5cc444000c9324b694517b794f33c4839f234fb |
| --- /dev/null |
| +++ b/src/sksl/ir/SkSLFunctionReference.h |
| @@ -0,0 +1,36 @@ |
| +/* |
| + * 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_FUNCTIONREFERENCE |
| +#define SKSL_FUNCTIONREFERENCE |
| + |
| +#include "SkSLExpression.h" |
| + |
| +namespace SkSL { |
| + |
| +/** |
| + * An identifier referring to a function name. This is an intermediate value: FunctionReferences are |
| + * always eventually replaced by FunctionCalls in valid programs. |
|
dogben
2016/06/22 17:43:57
nit: s/FunctionCall/FunctionDeclaration/?
|
| + */ |
| +struct FunctionReference : public Expression { |
| + FunctionReference(Position position, std::vector<std::shared_ptr<FunctionDeclaration>> function) |
| + : INHERITED(position, kFunctionReference_Kind, kInvalid_Type) |
| + , fFunctions(function) {} |
|
dogben
2016/06/22 17:43:57
nit: std::move
|
| + |
| + virtual std::string description() const override { |
| + ASSERT(false); |
| + return "<function>"; |
| + } |
| + |
| + const std::vector<std::shared_ptr<FunctionDeclaration>> fFunctions; |
| + |
| + typedef Expression INHERITED; |
| +}; |
| + |
| +} // namespace |
| + |
| +#endif |