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.
244
245
246
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 244
def initialize child
@child = child
end
|
Instance Attribute Details
#child ⇒ Object
Returns the value of attribute child.
243
244
245
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 243
def child
@child
end
|
Instance Method Details
#calculate_follow_sets ⇒ Object
266
267
268
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 266
def calculate_follow_sets
child.calculate_follow_sets
end
|
#first ⇒ Object
258
259
260
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 258
def first
child.first
end
|
#last ⇒ Object
262
263
264
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 262
def last
child.last
end
|
#nullable ⇒ Object
254
255
256
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 254
def nullable
child.nullable
end
|
#to_dot(graph) ⇒ Object
248
249
250
251
252
|
# File 'lib/dhaka/lexer/regex_grammar.rb', line 248
def to_dot(graph)
graph.node(self, :label => label)
graph.edge(self, child)
child.to_dot(graph)
end
|