parent
1b0a2b3a7a
commit
f83031935f
@ -0,0 +1,19 @@
|
||||
require_relative "instance"
|
||||
|
||||
module Lox
|
||||
class LoxClass
|
||||
|
||||
attr_reader :name
|
||||
|
||||
def initialize(name)
|
||||
@name = name
|
||||
end
|
||||
|
||||
def to_s = name
|
||||
|
||||
def call(interpreter, args) = Instance.new(self)
|
||||
|
||||
def arity = 0
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in new issue