Class: Melbourne::AST::StringLiteral

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

Overview

A string literal as in:

'some'

Direct Known Subclasses

DynamicString, ExecuteString

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, str) ⇒ StringLiteral

Returns a new instance of StringLiteral.



197
198
199
200
# File 'lib/melbourne/ast/literals.rb', line 197

def initialize(line, str)
  @line = line
  @string = str
end

Instance Attribute Details

#stringObject

The actual string of the string literal



195
196
197
# File 'lib/melbourne/ast/literals.rb', line 195

def string
  @string
end