Scanner

constructor()

Allocate a new Scanner.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.


constructor(scope: <Error class: unknown class>)

Allocate a new Scanner using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

scope

The AutofreeScope to allocate this structure in.


constructor(userData: <Error class: unknown class>, maxParseErrors: <Error class: unknown class>, parseErrors: <Error class: unknown class>, inputName: String?, config: ScannerConfig?, token: TokenType, line: <Error class: unknown class>, position: <Error class: unknown class>, nextToken: TokenType, nextLine: <Error class: unknown class>, nextPosition: <Error class: unknown class>)

Allocate a new Scanner.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.

Parameters

userData

unused

maxParseErrors

unused

parseErrors

g_scanner_error() increments this field

inputName

name of input stream, featured by the default message handler

config

link into the scanner configuration

token

token parsed by the last g_scanner_get_next_token()

line

line number of the last token from g_scanner_get_next_token()

position

char number of the last token from g_scanner_get_next_token()

nextToken

token parsed by the last g_scanner_peek_next_token()

nextLine

line number of the last token from g_scanner_peek_next_token()

nextPosition

char number of the last token from g_scanner_peek_next_token()


constructor(userData: <Error class: unknown class>, maxParseErrors: <Error class: unknown class>, parseErrors: <Error class: unknown class>, inputName: String?, config: ScannerConfig?, token: TokenType, line: <Error class: unknown class>, position: <Error class: unknown class>, nextToken: TokenType, nextLine: <Error class: unknown class>, nextPosition: <Error class: unknown class>, scope: <Error class: unknown class>)

Allocate a new Scanner using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

userData

unused

maxParseErrors

unused

parseErrors

g_scanner_error() increments this field

inputName

name of input stream, featured by the default message handler

config

link into the scanner configuration

token

token parsed by the last g_scanner_get_next_token()

line

line number of the last token from g_scanner_get_next_token()

position

char number of the last token from g_scanner_get_next_token()

nextToken

token parsed by the last g_scanner_peek_next_token()

nextLine

line number of the last token from g_scanner_peek_next_token()

nextPosition

char number of the last token from g_scanner_peek_next_token()

scope

The AutofreeScope to allocate this structure in.


constructor(pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)