Class: Rubinius::AST::RegexLiteral

Inherits:
Node
  • Object
show all
Defined in:
lib/compiler/ast/literals.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

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

#optionsObject

Returns the value of attribute options.



128
129
130
# File 'lib/compiler/ast/literals.rb', line 128

def options
  @options
end

#sourceObject

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_sexpObject



136
137
138
# File 'lib/compiler/ast/literals.rb', line 136

def to_sexp
  [:regex, @source, @options]
end