Class: Chelsy::Type::Integral

Inherits:
Numeric show all
Defined in:
lib/chelsy/ast.rb

Overview

== Integer types

Direct Known Subclasses

Char, Int, Long, LongLong, Short

Instance Attribute Summary

Attributes inherited from Element

#fragments, #post_fragments

Instance Method Summary collapse

Methods inherited from Base

#const?, #qualified?, #volatile?

Constructor Details

#initialize(unsigned: false, **rest) ⇒ Integral

Returns a new instance of Integral.



321
322
323
324
# File 'lib/chelsy/ast.rb', line 321

def initialize(unsigned: false, **rest)
  @unsigned = !!unsigned
  super(**rest)
end

Instance Method Details

#unsigned?Boolean

Returns:

  • (Boolean)


326
# File 'lib/chelsy/ast.rb', line 326

def unsigned?; @unsigned end