WebCAD-Lib-TS API 文档 - v1.0.0
    Preparing search index...

    Class MTextToken

    Represents a token in MText parsing with its type, context, and data

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Create a new MTextToken

      Parameters

      • type: TokenTypeValue

        The token type

      • ctx: MTextContext

        The MText context at the time of token creation

      • data: any

        The token data (varies by type)

      Returns MTextToken

    Properties

    type: TokenTypeValue
    data: any

    Accessors

    • get typeName(): string

      Get the token type name as a string

      Returns string

      The token type name

    Methods

    • Convert token to a plain object for serialization

      Returns Record<string, any>

      Plain object representation

    • Create a string representation of the token

      Returns string

      String representation