Class: Piggly::Parser::Nodes::If

Inherits:
Branch show all
Defined in:
lib/piggly/parser/nodes.rb

Overview

IF boolean-cond THEN body

Instance Attribute Summary

Attributes inherited from NodeClass

#source_text

Instance Method Summary collapse

Methods inherited from Branch

#branch?

Methods inherited from Statement

#statement?

Methods inherited from NodeClass

#assignment?, #block?, #branch?, #comment?, #datatype?, #else?, #expression?, #for?, #identifier?, #indent, #keyword?, #label?, #loop?, #named?, #sql?, #statement?, #string?, #stub?, #style, #tag, #tag_id, #tagged?, #token?, #while?, #whitespace?

Methods included from Traversal

#count, #find, #flatten, #inject, #select

Instance Method Details

#if?Boolean

Returns:

  • (Boolean)


141
142
143
# File 'lib/piggly/parser/nodes.rb', line 141

def if?
  true
end

#terminal?Boolean

Returns:

  • (Boolean)


145
146
147
# File 'lib/piggly/parser/nodes.rb', line 145

def terminal?
  false
end