File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ target_sources(scratchcpp
33 executioncontext.cpp
44 executioncontext_p.cpp
55 executioncontext_p.h
6+ internal /icodebuilder.h
67 internal /llvmexecutablecode.cpp
78 internal /llvmexecutablecode.h
89 internal /llvmexecutioncontext.cpp
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0
2+
3+ #pragma once
4+
5+ #include < string>
6+ #include < memory>
7+
8+ namespace libscratchcpp
9+ {
10+
11+ class Value ;
12+ class Variable ;
13+ class List ;
14+ class ExecutableCode ;
15+
16+ class ICodeBuilder
17+ {
18+ public:
19+ virtual ~ICodeBuilder () { }
20+
21+ virtual std::shared_ptr<ExecutableCode> finalize () = 0;
22+
23+ virtual void addFunctionCall (const std::string &functionName, int argCount, bool returns) = 0;
24+ virtual void addConstValue (const Value &value) = 0;
25+ virtual void addVariableValue (Variable *variable) = 0;
26+ virtual void addListContents (List *list) = 0;
27+
28+ virtual void beginIfStatement () = 0;
29+ virtual void beginElseBranch () = 0;
30+ virtual void endIf () = 0;
31+
32+ virtual void beginLoop () = 0;
33+ virtual void endLoop () = 0;
34+
35+ virtual void yield () = 0;
36+ };
37+
38+ } // namespace libscratchcpp
You can’t perform that action at this time.
0 commit comments