Class: Trope::Language::Literal

Inherits:
Node
  • Object
show all
Defined in:
lib/trope/language/literal.rb

Overview

A literal.

Direct Known Subclasses

FloatLiteral, IntegerLiteral, StringLiteral

Instance Method Summary collapse

Methods inherited from Node

#elements, #elements_with_treetop_nodes

Instance Method Details

#valueObject

The value of the literal.



10
11
12
# File 'lib/trope/language/literal.rb', line 10

def value
  elements_with_treetop[1].text_value # Skip the first node
end