Class: Rubinius::AST::Match
- Defined in:
- lib/compiler/ast/control_flow.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, pattern, flags) ⇒ Match
constructor
A new instance of Match.
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, pattern, flags) ⇒ Match
Returns a new instance of Match.
179 180 181 182 |
# File 'lib/compiler/ast/control_flow.rb', line 179 def initialize(line, pattern, flags) @line = line @pattern = RegexLiteral.new line, pattern, flags end |
Instance Attribute Details
#pattern ⇒ Object
Returns the value of attribute pattern.
177 178 179 |
# File 'lib/compiler/ast/control_flow.rb', line 177 def pattern @pattern end |
Instance Method Details
#to_sexp ⇒ Object
184 185 186 |
# File 'lib/compiler/ast/control_flow.rb', line 184 def to_sexp [:match, @pattern.to_sexp] end |