Class: Rubinius::AST::RegexLiteral
- Defined in:
- lib/compiler/ast/literals.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#source ⇒ Object
Returns the value of attribute source.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, str, flags) ⇒ RegexLiteral
constructor
A new instance of RegexLiteral.
- #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, str, flags) ⇒ RegexLiteral
Returns a new instance of RegexLiteral.
130 131 132 133 134 |
# File 'lib/compiler/ast/literals.rb', line 130 def initialize(line, str, flags) @line = line @source = str @options = flags end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
128 129 130 |
# File 'lib/compiler/ast/literals.rb', line 128 def @options end |
#source ⇒ Object
Returns the value of attribute source.
128 129 130 |
# File 'lib/compiler/ast/literals.rb', line 128 def source @source end |
Instance Method Details
#to_sexp ⇒ Object
136 137 138 |
# File 'lib/compiler/ast/literals.rb', line 136 def to_sexp [:regex, @source, @options] end |