Class: Idl::ImplicationExpressionAst

Inherits:
AstNode
  • Object
show all
Defined in:
lib/udb/idl/condition_to_udb.rb

Instance Method Summary collapse

Instance Method Details

#to_udb_h(symtab) ⇒ UdbHashType

Parameters:

  • symtab (Idl::SymbolTable)

Returns:



25
26
27
28
29
30
31
32
33
34
# File 'lib/udb/idl/condition_to_udb.rb', line 25

def to_udb_h(symtab)
  if antecedent.is_a?(TrueExpressionAst)
    consequent.to_udb_h(symtab)
  else
    {
      "if" => antecedent.to_udb_h(symtab),
      "then" => consequent.to_udb_h(symtab)
    }
  end
end