feat: 针对C的代码生成 (#50)
Co-authored-by: Lan_G <2911328695@qq.com> Reviewed-on: PostGuard/Canon#50
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user