kwasm.ast.type

Kwasm.ast.type

package kwasm.ast.type

Classes

Name Description
enum class ElementType

Represents an element type. As of the current version of WebAssembly, only FunctionReference is supported.

data class FunctionType

Data class to hold the parameters and results of a FunctionType from the docs:


functype ::=  ‘(’ ‘func’  t1:vec(param)  t2:vec(result) ‘)’ => [t1]→[t2]
param    ::=  ‘(’ ‘param’  id?  t:valtype ‘)’                 => t
result   ::=  ‘(’ ‘result’  t:valtype ‘)’                     => t

data class GlobalType

Data class encapsulating the value type and mutability of a GlobalType in the spec. From the docs:


globaltype ::=  t:valtype                => const t
‘(’ ‘mut’  t:valtype ‘)’ => var t

data class Limits

This is a data class that represents the limits of a Limits object.

data class MemoryType

This data class is used to represent the structure of a MemoryType

data class Param

Data class to hold a parameter's id and valuetype from the docs:


param    ::=  ‘(’ ‘param’  id?  t:valtype ‘)’  => t

data class Result

Data class to hold a result's valuetype from the docs:


result   ::=  ‘(’ ‘result’  t:valtype ‘)’  => t

data class ResultType

Data class to hold a ResultType's result from the docs:


resultType   ::=  (t:result)?  => [t?]

data class TableType

This data class represents TableType

sealed class ValueType

From the docs:


valtype ::=  { 'i32' -> I32
'i64' -> I64
'f32' -> F32
'f64' -> F64 }