Class: Piggly::Parser::Nodes::Terminal
- Defined in:
- lib/piggly/parser/nodes.rb
Overview
Terminals have no children
Instance Attribute Summary
Attributes inherited from NodeClass
Instance Method Summary collapse
-
#initialize(input, interval, elements = nil) ⇒ Terminal
constructor
A new instance of Terminal.
- #terminal? ⇒ Boolean
Methods inherited from NodeClass
#assignment?, #block?, #branch?, #comment?, #datatype?, #else?, #expression?, #for?, #identifier?, #if?, #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
Constructor Details
#initialize(input, interval, elements = nil) ⇒ Terminal
Returns a new instance of Terminal.
274 275 276 277 |
# File 'lib/piggly/parser/nodes.rb', line 274 def initialize(input, interval, elements = nil) # Third argument nil prevents children from being assigned super(input, interval, nil) end |
Instance Method Details
#terminal? ⇒ Boolean
279 280 281 |
# File 'lib/piggly/parser/nodes.rb', line 279 def terminal? true end |