Class: Dhaka::LexerSupport::UnaryNode
- Inherits:
-
ASTNode
- Object
- ASTNode
- Dhaka::LexerSupport::UnaryNode
show all
- Defined in:
- lib/dhaka/lexer/regex_grammar.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from ASTNode
#accepting, #checkpoint
Constructor Details
#initialize(child) ⇒ UnaryNode
Returns a new instance of UnaryNode.
245
246
247
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 245
def initialize child
@child = child
end
|
Instance Attribute Details
#child ⇒ Object
Returns the value of attribute child.
244
245
246
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 244
def child
@child
end
|
Instance Method Details
#calculate_follow_sets ⇒ Object
267
268
269
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 267
def calculate_follow_sets
child.calculate_follow_sets
end
|
#first ⇒ Object
259
260
261
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 259
def first
child.first
end
|
#last ⇒ Object
263
264
265
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 263
def last
child.last
end
|
#nullable ⇒ Object
255
256
257
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 255
def nullable
child.nullable
end
|
#to_dot(graph) ⇒ Object
249
250
251
252
253
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 249
def to_dot(graph)
graph.node(self, :label => label)
graph.edge(self, child)
child.to_dot(graph)
end
|