feat: 增加了analyzer, compiler不再分析并且报错, 只生产 bytecode, analyzer作为前端结束最后一道防线检查代码,同时引入一个简单的LSP
This commit is contained in:
28
src/Sema/Type.hpp
Normal file
28
src/Sema/Type.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*!
|
||||
@file src/Sema/Type.hpp
|
||||
@brief 前端类型检查的类型定义
|
||||
@author PuqiAR (im@puqiar.top)
|
||||
@date 2026-02-23
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace Fig
|
||||
{
|
||||
enum class TypeTag : std::uint8_t
|
||||
{
|
||||
Any, // 动态类型底线
|
||||
Null, // 空值
|
||||
Int,
|
||||
Double,
|
||||
Bool,
|
||||
String,
|
||||
Function,
|
||||
Struct,
|
||||
};
|
||||
|
||||
// TODO: 复杂类型的推导(泛型,结构体)
|
||||
// 添加 TypeInfo 结构体,目前先用 TypeTag
|
||||
};
|
||||
Reference in New Issue
Block a user