StacksScanner

class StacksScanner(commentToken: A_Token, moduleName: String) : AbstractStacksScanner

A scanner for Stacks comments.

Author

Richard Arriaga

Parameters

commentToken

The comment token to be scanned and tokenized.

moduleName

The name of the module the comment is in.

Constructors

Link copied to clipboard
fun StacksScanner(commentToken: A_Token, moduleName: String)

Construct a new StacksScanner.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun addedParagraphHTMLTag(): Boolean
Link copied to clipboard
fun addedParagraphHTMLTagFalse()

set the hasHTMLTag to false

Link copied to clipboard
fun addedParagraphHTMLTagTrue()

set the hasHTMLTag to true

Link copied to clipboard
fun addHTMLTokens(htmlTags: String)

Insert HTML tags in tokenized comments.

Link copied to clipboard
fun beingTokenized(): StringBuilder
Link copied to clipboard
fun decrementNewLineCount()

decrement new line

Link copied to clipboard
fun hasHTMLTag(): Boolean
Link copied to clipboard
fun hasHTMLTagFalse()

set the hasHTMLTag to false

Link copied to clipboard
fun hasHTMLTagTrue()

set the hasHTMLTag to true

Link copied to clipboard
fun incrementNewlineCount()

Increment new line

Link copied to clipboard
fun newlineCount(): Int
Link copied to clipboard
operator fun next(): Char

Extract the current character and increment the position.

Link copied to clipboard
fun obtainModuleSimpleName(): String

From the full directory path of a module name, obtain the leaf portion that represents the file name in the directory.

Link copied to clipboard
fun resetBeingTokenized()
Link copied to clipboard
fun resetNewlineCount()

Set the newlineCount to 0;

Link copied to clipboard
fun scan()

Scan the already-specified String to produce tokens.

Properties

Link copied to clipboard
var filePosition: Int = 0

The start position of the comment in the file.

Link copied to clipboard
var lineNumber: Int = 0

The line number of the start of the token currently being parsed.

Link copied to clipboard
val moduleLeafName: String

The module file name without the path.

Link copied to clipboard
var outputTokens: MutableList<AbstractStacksToken>

The tokens that have been parsed so far.

Link copied to clipboard
var position: Int = 0

The current position in the input string.

Link copied to clipboard
var tokenString: String

The comment token text that has been lexed as one long token.