forked from PuqiAR/Fig-TreeWalker
[Fix] 修复科学表达式数字解析的问题(Lexer引起) 由 Satklomi发现,感谢 [Feat] 增加Compiler相关定义,将开发BytecodeVM [Tip] Evaluator进入Bug fix阶段,新功能延缓开发。转向VM
21 lines
483 B
C++
21 lines
483 B
C++
#include <Ast/astBase.hpp>
|
|
#include <Compiler/Compiler.hpp>
|
|
#include <memory>
|
|
|
|
namespace Fig
|
|
{
|
|
void Compiler::compile(Ast::Statement stmt)
|
|
{
|
|
using enum Ast::AstType;
|
|
using namespace Ast;
|
|
Ast::AstType type = stmt->getType();
|
|
|
|
switch (type)
|
|
{
|
|
case VarDefSt: {
|
|
auto vd = std::static_pointer_cast<VarDefAst>(stmt);
|
|
const FString name = vd->name;
|
|
}
|
|
}
|
|
}
|
|
}; // namespace Fig
|