Module: Idl::Executable

Overview

interface for nodes that can be executed, but don’t have a value (e.g., statements)

Instance Method Summary collapse

Instance Method Details

#execute(symtab) ⇒ void

This method returns an undefined value.

“execute” the statement by updating the variables in the symbol table

Parameters:

  • symtab (SymbolTable)

    The symbol table for the context

Raises:

  • ValueError if some part of the statement cannot be executed at compile time

[View source]

424
# File 'lib/idl/ast.rb', line 424

def execute(symtab) = raise NotImplementedError, "#{self.class.name} must implement execute"

#execute_unknown(symtab) ⇒ void

This method returns an undefined value.

“execute” the statement, forcing any variable assignments to an unknown state This is used down unknown conditional paths.

Parameters:

  • symtab (SymbolTable)

    The symbol table for the context

Raises:

  • ValueError if some part of the statement cannot be executed at compile time

[View source]

427
# File 'lib/idl/ast.rb', line 427

def execute_unknown(symtab) = raise NotImplementedError, "#{self.class.name} must implement execute_unknown"