Class: Racc::SourceText
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/racc/sourcetext.rb |
Class Method Summary
- .new(text, filename, lineno) ⇒ SourceText constructor
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(text, filename, lineno) ⇒ SourceText
Instance Attribute Details
#filename (readonly)
[ GitHub ]# File 'lib/racc/sourcetext.rb', line 22
attr_reader :filename
#lineno (readonly)
[ GitHub ]# File 'lib/racc/sourcetext.rb', line 23
attr_reader :lineno
#text (readonly)
[ GitHub ]# File 'lib/racc/sourcetext.rb', line 21
attr_reader :text
Instance Method Details
#location
[ GitHub ]# File 'lib/racc/sourcetext.rb', line 29
def location "#{@filename}:#{@lineno}" end
#to_s
[ GitHub ]# File 'lib/racc/sourcetext.rb', line 25
def to_s "#<SourceText #{location()}>" end