feat: 针对C的代码生成 (#50)

Co-authored-by: Lan_G <2911328695@qq.com>
Reviewed-on: PostGuard/Canon#50
This commit is contained in:
2024-04-21 22:24:35 +08:00
parent 4353fb0c01
commit 3a584751dc
36 changed files with 906 additions and 31 deletions

View File

@@ -49,6 +49,16 @@ public abstract class SemanticToken : IEquatable<SemanticToken>
}
}
public T Convert<T>() where T : SemanticToken
{
if (this is T result)
{
return result;
}
throw new InvalidOperationException("Can not convert target type0");
}
/// <summary>
/// 栈底符号单例对象
/// </summary>