AbstractStacksToken

abstract class AbstractStacksToken(    lexeme: String,     lineNumber: Int,     position: Int,     startOfTokenLinePosition: Int,     moduleName: String,     val isSectionToken: Boolean)

The abstract form of a token in a Stacks comment that has been lexed.

Author

Richard Arriaga

Parameters

lexeme

The string to be tokenized.

lineNumber

The line number where the token occurs/begins

position

The absolute start position of the token

startOfTokenLinePosition

The position on the line where the token starts.

moduleName

The module this token is in.

isSectionToken

Whether this is a section (§) token.

Constructors

Link copied to clipboard
fun AbstractStacksToken(    lexeme: String,     lineNumber: Int,     position: Int,     startOfTokenLinePosition: Int,     moduleName: String,     isSectionToken: Boolean)

Construct a new AbstractStacksToken.

Functions

Link copied to clipboard
fun quotedLexeme(): String

Provide the token's string representation.

Link copied to clipboard
open fun toJSON(    linkingFileMap: LinkingFileMap,     hashID: Int,     errorLog: StacksErrorLog,     jsonWriter: JSONWriter): String

Create JSON form of token.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val isSectionToken: Boolean

Whether this is a section (§) token.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard