Class: RubyRTL::IntType

Inherits:
Type show all
Defined in:
lib/ruby_rtl/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Ast

#comments

Instance Method Summary collapse

Methods inherited from Ast

#accept

Constructor Details

#initialize(nbits = 32) ⇒ IntType

Returns a new instance of IntType.



304
305
306
# File 'lib/ruby_rtl/ast.rb', line 304

def initialize nbits=32
  @bitwidth=nbits
end

Instance Attribute Details

#bitwidthObject

Returns the value of attribute bitwidth.



303
304
305
# File 'lib/ruby_rtl/ast.rb', line 303

def bitwidth
  @bitwidth
end

Instance Method Details

#to_sObject



308
309
310
# File 'lib/ruby_rtl/ast.rb', line 308

def to_s
  "int#{bitwidth}"
end