Class: Propose::Tree::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/propose/tree/node.rb

Overview

Generic definition of a parse tree node for propositional logic.

Direct Known Subclasses

Atom, BinaryOperation, Falsum, Sequent, UnaryOperation, Verum

Instance Method Summary collapse

Instance Method Details

#childrenObject

Nodes which can be considered the children of this node.



5
6
7
# File 'lib/propose/tree/node.rb', line 5

def children
  []
end

#literal?Boolean

Whether this node can be considered an unambiguous single lexical unit.

This is used to omit unnecessary parentheses when rendering.

Returns:

  • (Boolean)


12
13
14
# File 'lib/propose/tree/node.rb', line 12

def literal?
  false
end