Skip to content

T_Cyjb_Text_UnexpectedTokenError_1

CYJB edited this page Mar 23, 2024 · 7 revisions

UnexpectedTokenError(T) 类

表示发现非预期的词法单元的错误。

继承层次

System.Object
  Cyjb.Text.TokenParseError
    Cyjb.Text.UnexpectedTokenError(T)
Namespace: Cyjb.Text
Assembly: Cyjb.Compilers.Runtime (in Cyjb.Compilers.Runtime.dll) Version: 1.0.20+d347ea0351607fb282fdf60a5301f9cccb3ab27e

语法

C#

public class UnexpectedTokenError<T> : TokenParseError
where T : struct, new()

类型参数

 

T
语法节点标识符的类型,必须是一个枚举类型。
  The UnexpectedTokenError(T) type exposes the following members.

构造函数

 

名称 说明
公共方法 UnexpectedTokenError(T) 使用非预期的词法单元列表初始化 UnexpectedTokenError(T) 类的新实例。
  Back to Top

属性

 

名称 说明
公共属性 Expecting 获取预期的词法单元类型。
公共属性 Span 获取语法分析错误的范围。 (重写 TokenParseError.Span.)
公共属性 Token 获取非预期的词法单元。
  Back to Top

方法

 

名称 说明
公共方法 Equals(Object) 返回当前对象是否等于另一对象。 (继承自 TokenParseError。)
公共方法 Equals(TokenParseError) 返回当前对象是否等于同一类型的另一对象。 (重写 TokenParseError.Equals(TokenParseError).)
受保护的方法 Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。)
公共方法 GetHashCode 返回当前对象的哈希值。 (重写 TokenParseError.GetHashCode().)
公共方法 GetType Gets the Type of the current instance. (继承自 Object。)
受保护的方法 MemberwiseClone Creates a shallow copy of the current Object. (继承自 Object。)
公共方法 ToString 返回当前对象的字符串表示形式。 (重写 Object.ToString().)
  Back to Top

参见

Reference

Cyjb.Text 命名空间

Clone this wiki locally