kwasm.ast.util

Kwasm.ast.util

package kwasm.ast.util

Classes

Name Description
interface AstNodeIndex

Zero-indexed and named-lookup table of AstNodes.

interface MutableAstNodeIndex

Mutable variant of AstNodeIndex.

Note: Not thread-safe.

Methods

AstNodeIndex

fun <T : AstNode> AstNodeIndex(): AstNodeIndex<T>

Creates a new AstNodeIndex.

ReturnValue

Name Description
AstNodeIndex<T>

MutableAstNodeIndex

fun <T : AstNode> MutableAstNodeIndex(): MutableAstNodeIndex<T>

Creates a new AstNodeIndex.

ReturnValue

Name Description
MutableAstNodeIndex<T>

toTypeIndex

fun String.toTypeIndex(): ByIdentifier<Type>

Converts the String into an Identifier.Type-based Index.

Receiver

Name Description
String

ReturnValue

Name Description
ByIdentifier<Type>

toFunctionIndex

fun String.toFunctionIndex(): ByIdentifier<Function>

Converts the String into an Identifier.Function-based Index.

Receiver

Name Description
String

ReturnValue

Name Description
ByIdentifier<Function>

toTableIndex

fun String.toTableIndex(): ByIdentifier<Table>

Converts the String into an Identifier.Table-based Index.

Receiver

Name Description
String

ReturnValue

Name Description
ByIdentifier<Table>

toMemoryIndex

fun String.toMemoryIndex(): ByIdentifier<Memory>

Converts the String into an Identifier.Memory-based Index.

Receiver

Name Description
String

ReturnValue

Name Description
ByIdentifier<Memory>

toGlobalIndex

fun String.toGlobalIndex(): ByIdentifier<Global>

Converts the String into an Identifier.Global-based Index.

Receiver

Name Description
String

ReturnValue

Name Description
ByIdentifier<Global>

toLocalIndex

fun String.toLocalIndex(): ByIdentifier<Local>

Converts the String into an Identifier.Local-based Index.

Receiver

Name Description
String

ReturnValue

Name Description
ByIdentifier<Local>

toLabelIndex

fun String.toLabelIndex(): ByIdentifier<Label>

Converts the String into an Identifier.Label-based Index.

Receiver

Name Description
String

ReturnValue

Name Description
ByIdentifier<Label>