class Dentaku::AST::Literal

Attributes

type[R]

Public Class Methods

new(token) click to toggle source
# File lib/dentaku/ast/literal.rb, line 6
def initialize(token)
  @token = token
  @value = token.value
  @type  = token.category
end

Public Instance Methods

accept(visitor) click to toggle source
# File lib/dentaku/ast/literal.rb, line 20
def accept(visitor)
  visitor.visit_literal(self)
end
dependencies(*) click to toggle source
# File lib/dentaku/ast/literal.rb, line 16
def dependencies(*)
  []
end
quoted() click to toggle source
# File lib/dentaku/ast/literal.rb, line 24
def quoted
  @token.raw_value || value.to_s
end
Also aliased as: to_s
to_s()
Alias for: quoted
value(*) click to toggle source
# File lib/dentaku/ast/literal.rb, line 12
def value(*)
  @value
end