Class: Wood::Types::NumericType
- Inherits:
-
BuiltinType
- Object
- Struct
- BuiltinType
- Wood::Types::NumericType
- Defined in:
- lib/wood/types.rb
Instance Attribute Summary
Attributes inherited from BuiltinType
Instance Method Summary collapse
-
#initialize(name, *aliases) ⇒ NumericType
constructor
A new instance of NumericType.
- #zero_value ⇒ Object
Methods inherited from BuiltinType
#==, #builtin?, #node_name, #numeric?, #sexp, #type
Methods included from TypeMatching
Constructor Details
#initialize(name, *aliases) ⇒ NumericType
Returns a new instance of NumericType.
220 221 222 |
# File 'lib/wood/types.rb', line 220 def initialize(name, *aliases) super(name, true, *aliases) end |
Instance Method Details
#zero_value ⇒ Object
224 225 226 |
# File 'lib/wood/types.rb', line 224 def zero_value @zero_value ||= Wood::Nodes::Literal[type: self, value: 0] end |