Files
Fig/src/Ast/Expr/IdentiExpr.hpp

40 lines
862 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*!
@file src/Ast/Expr/IdentiExpr.hpp
@brief IdentiExpr定义
@author PuqiAR (im@puqiar.top)
@date 2026-02-14
*/
#pragma once
#include <Ast/Base.hpp>
#include <Deps/Deps.hpp>
namespace Fig
{
struct IdentiExpr final : Expr
{
String name;
// Analyzer槽位存储具体深度
int resolvedDepth = -1; // 代表未解析
bool isGlobal = false; // 是否全局/对外公开 (isPublic)
IdentiExpr()
{
type = AstType::IdentiExpr;
}
IdentiExpr(String _name, SourceLocation _loc)
{
type = AstType::IdentiExpr;
name = std::move(_name);
location = std::move(_loc);
}
virtual String toString() const override
{
return std::format("<IdentiExpr: {}>", name);
}
};
};