class RubyRTL::IntLit

Public Class Methods

new(val) click to toggle source
Calls superclass method RubyRTL::Literal::new
# File lib/ruby_rtl/ast.rb, line 220
def initialize val
  val=val==0 ? 1 : val
  bitwidth=Math.log2(val).floor+1
  super(val,IntType.new)
end

Public Instance Methods

+(other) click to toggle source
# File lib/ruby_rtl/ast.rb, line 226
def +(other)
  ret=Binary.new(self,"+",other)
  ret.type=@type
  ret
end