rpl.rb/lib/rpl/core/program.rb

21 lines
487 B
Ruby
Raw Normal View History

2021-12-07 16:09:17 +01:00
# frozen_string_literal: true
module RplLang
2022-02-10 14:50:59 +01:00
module Core
module Program
def populate_dictionary
super
2021-11-18 12:00:02 +01:00
@dictionary.add_word( ['eval'],
'Program',
'( a -- … ) interpret',
proc do
args = stack_extract( [:any] )
2021-11-18 12:00:02 +01:00
run( args[0][:value].to_s )
end )
end
2021-11-18 12:00:02 +01:00
end
end
end