ImportDescriptorValidator

ImportDescriptorValidator

object ImportDescriptorValidator

Validator of ImportDescriptor nodes.

From the docs:


func x
  • The function C.types[x] must be defined in the context.
  • Let [t*^1] => [t*^2] be the function type C.types[x].
  • Then the import description is valid with type func [t*^1] => [t*^2].

table tabletype
  • The table type tabletype must be valid.
  • Then the import description is valid with type table tabletype.

mem memtype
  • The memory type memtype must be valid.
  • Then the import description is valid with type mem memtype.

global globaltype

  • The global type globaltype must be valid.
  • Then the import description is valid with type global globaltype.

Methods

visit

fun visit(node: ImportDescriptor, context: Module): Module

Validates the given node, and if necessary: its children (recursively, using other ValidationVisitor instances).

Parameters

Name Description
node: ImportDescriptor
context: Module

ReturnValue

Name Description
Module