GlobalValidator

GlobalValidator

object GlobalValidator

Validator of Global nodes.

From the docs:

  • The global type mut t must be valid.
  • The expression expr must be valid with result type [t].
  • The expression expr must be constant.
  • Then the global definition is valid with type mut t.

Methods

visit

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

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

Parameters

Name Description
node: Global
context: Module

ReturnValue

Name Description
Module