rpl.rb/lib/core/general.rb

30 lines
589 B
Ruby
Raw Normal View History

2021-12-07 16:09:17 +01:00
# frozen_string_literal: true
module Rpl
2021-12-07 15:50:58 +01:00
module Lang
module Core
module_function
2021-12-07 15:50:58 +01:00
# no operation
def nop( stack, dictionary )
[stack, dictionary]
2021-12-07 15:50:58 +01:00
end
2022-02-09 16:35:54 +01:00
# show version
def version( stack, dictionary )
stack += Rpl::Interpreter.parse( Rpl::Lang.version.to_s )
[stack, dictionary]
end
# show complete identification string
def uname( stack, dictionary )
stack += Rpl::Interpreter.parse( "\"Rpl Interpreter version #{Rpl::Lang.version}\"" )
[stack, dictionary]
end
end
end
end