blob: 4305011fa5cdc798c8f2f4b2b8da375415d6fb80 [file] [log] [blame]
ethannicholasb3058bd2016-07-01 08:22:01 -07001/*
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
Greg Daniel792d0f12016-11-20 14:53:35 +000011#include <memory>
12#include <string>
ethannicholasb3058bd2016-07-01 08:22:01 -070013
14namespace SkSL {
15
16/**
17 * Represents a node in the abstract syntax tree (AST). The AST is based directly on the parse tree;
18 * it is a parsed-but-not-yet-analyzed version of the program.
19 */
20struct ASTNode {
21 virtual ~ASTNode() {}
ethannicholasf789b382016-08-03 12:43:36 -070022
Greg Daniel792d0f12016-11-20 14:53:35 +000023 virtual std::string description() const = 0;
ethannicholasb3058bd2016-07-01 08:22:01 -070024};
25
26} // namespace
27
28#endif