Class: RubyRTL::Literal

Inherits:
Ast
  • Object
show all
Defined in:
lib/ruby_rtl/ast.rb

Overview

literals ===

Direct Known Subclasses

BitLit, IntLit, RIntLit, RUIntLit, UIntLit

Instance Attribute Summary collapse

Attributes inherited from Ast

#comments

Instance Method Summary collapse

Methods inherited from Ast

#accept

Constructor Details

#initialize(val, type = nil) ⇒ Literal

Returns a new instance of Literal.



211
212
213
# File 'lib/ruby_rtl/ast.rb', line 211

def initialize val,type=nil
  @val,@type=val,type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



209
210
211
# File 'lib/ruby_rtl/ast.rb', line 209

def type
  @type
end

#valObject

Returns the value of attribute val.



208
209
210
# File 'lib/ruby_rtl/ast.rb', line 208

def val
  @val
end