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_ASTNODE 9 #define SKSL_ASTNODE 10 11 #include "SkSLString.h" 12 13 namespace SkSL { 14 15 /** 16 * Represents a node in the abstract syntax tree (AST). The AST is based directly on the parse tree; 17 * it is a parsed-but-not-yet-analyzed version of the program. 18 */ 19 struct ASTNode { ~ASTNodeASTNode20 virtual ~ASTNode() {} 21 22 virtual String description() const = 0; 23 }; 24 25 } // namespace 26 27 #endif 28