Class: SyntaxTree::TStringBeg

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree.rb

Overview

TStringBeg represents the beginning of a string literal.

"string"

In the example above, TStringBeg represents the first set of quotes. Strings can also use single quotes. They can also be declared using the %q and %Q syntax, as in:

%q{string}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ TStringBeg

Returns a new instance of TStringBeg.



11872
11873
11874
11875
# File 'lib/syntax_tree.rb', line 11872

def initialize(value:, location:)
  @value = value
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11870
11871
11872
# File 'lib/syntax_tree.rb', line 11870

def location
  @location
end

#valueObject (readonly)

String

the beginning of the string



11867
11868
11869
# File 'lib/syntax_tree.rb', line 11867

def value
  @value
end