abstract class Myst::TPrimitive(T)

Overview

Primitives are immutable objects

Direct Known Subclasses

Defined in:

myst/interpreter/value.cr

Constructors

Instance Method Summary

Instance methods inherited from class Myst::Value

ivars : Scope ivars, ivars=(ivars : Scope) ivars=, truthy? truthy?, type_name type_name

Class methods inherited from class Myst::Value

from_literal(literal : Node) from_literal

Constructor Detail

def self.new(value : T) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def value : T #

[View source]
def value=(value : T) #

[View source]