Class: Dentaku::AST::Literal
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #dependencies ⇒ Object
-
#initialize(token) ⇒ Literal
constructor
A new instance of Literal.
- #value ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(token) ⇒ Literal
Returns a new instance of Literal.
6 7 8 9 |
# File 'lib/dentaku/ast/literal.rb', line 6 def initialize(token) @value = token.value @type = token.category end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/dentaku/ast/literal.rb', line 4 def type @type end |
Instance Method Details
#dependencies ⇒ Object
15 16 17 |
# File 'lib/dentaku/ast/literal.rb', line 15 def dependencies(*) [] end |
#value ⇒ Object
11 12 13 |
# File 'lib/dentaku/ast/literal.rb', line 11 def value(*) @value end |