blob: 7fa8c1931a9f4a87c8c17cfccea7a3823d1bef78 [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_CODEGENERATOR
9#define SKSL_CODEGENERATOR
10
11#include "ir/SkSLProgram.h"
12#include <vector>
jvanverth9df16b52016-10-11 10:03:56 -070013#include <iostream>
ethannicholasb3058bd2016-07-01 08:22:01 -070014
15namespace SkSL {
16
17/**
18 * Abstract superclass of all code generators, which take a Program as input and produce code as
19 * output.
20 */
21class CodeGenerator {
22public:
ethannicholasf789b382016-08-03 12:43:36 -070023 virtual ~CodeGenerator() {}
24
25 virtual void generateCode(const Program& program, std::ostream& out) = 0;
ethannicholasb3058bd2016-07-01 08:22:01 -070026};
27
28} // namespace
29
30#endif