Sha256: 61664e2346051cd0975dc29b1f9a3bc1ab6425a6509a80fe583c543353db1c18

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

# # frozen_string_literal: true

require_relative 'word'
require_relative 'module_memo_word'

module Forthic
  class ModuleMemoBangAtWord < Word
    attr_accessor :memo_word

    # @param [ModuleMemoWord] memo_word
    def initialize(memo_word)
      super("#{memo_word.name}!@")
      @memo_word = memo_word
    end

    # @param [Interpreter] interp
    def execute(interp)
      @memo_word.refresh(interp)
      interp.stack_push(@memo_word.value)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forthic-0.1.0 lib/forthic/words/module_memo_bang_at_word.rb