Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
mattt edited this page Dec 21, 2020 · 1 revision

Token

A highlighter token.

public struct Token: Equatable, Hashable, Codable

Inheritance

Codable, Equatable, Hashable

Initializers

init(_:kind:)

Create a new highlighter token with the specified text and kind.

public init<Kind: TokenKind>(_ text: String, kind: Kind.Type)

Parameters

  • text: The token text.
  • kind: The kind of token.

Properties

text

The token text.

var text: String

className

The name of the token kind.

var className: String?

html

An HTML representation of the highlighter token.

var html: String
Clone this wiki locally