Class: Onigmo::QuantifierNode

Inherits:
Node
  • Object
show all
Defined in:
lib/onigmo/node.rb,
lib/onigmo/visitor.rb,
ext/onigmo/onigmo.c

Overview

a1,2

^^^^^

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#as_json, #deconstruct_keys, #pretty_print, #to_json

Constructor Details

#initialize(lower, upper, greedy, node) ⇒ QuantifierNode

Returns a new instance of QuantifierNode.



239
240
241
242
243
244
# File 'lib/onigmo/node.rb', line 239

def initialize(lower, upper, greedy, node)
  @lower = lower
  @upper = upper
  @greedy = greedy
  @node = node
end

Instance Attribute Details

#greedyObject (readonly)

Returns the value of attribute greedy.



237
238
239
# File 'lib/onigmo/node.rb', line 237

def greedy
  @greedy
end

#lowerObject (readonly)

Returns the value of attribute lower.



237
238
239
# File 'lib/onigmo/node.rb', line 237

def lower
  @lower
end

#nodeObject (readonly)

Returns the value of attribute node.



237
238
239
# File 'lib/onigmo/node.rb', line 237

def node
  @node
end

#upperObject (readonly)

Returns the value of attribute upper.



237
238
239
# File 'lib/onigmo/node.rb', line 237

def upper
  @upper
end

Instance Method Details

#accept(visitor) ⇒ Object



255
256
257
# File 'lib/onigmo/visitor.rb', line 255

def accept(visitor)
  visitor.visit_quantifier_node(self)
end

#child_nodesObject



259
260
261
# File 'lib/onigmo/visitor.rb', line 259

def child_nodes
  [node]
end