add __ppstack for debugging

This commit is contained in:
Gwenhael Le Moine 2021-12-16 15:22:14 +01:00
parent 3401f98eb9
commit 3a0d7217b3
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 10 additions and 2 deletions

View file

@ -26,6 +26,7 @@ module Rpl
# @dictionary.add( 'version', proc { |stack, dictionary| Rpl::Lang::Core.__todo( stack, dictionary ) } ) # show rpn version
# @dictionary.add( 'uname', proc { |stack, dictionary| Rpl::Lang::Core.__todo( stack, dictionary ) } ) # show rpn complete identification string
# @dictionary.add( 'history', proc { |stack, dictionary| Rpl::Lang::Core.__todo( stack, dictionary ) } ) # see commands history
@dictionary.add( '__ppstack', proc { |stack, dictionary| Rpl::Lang::Core.__pp_stack( stack, dictionary ) } )
# STACK
@dictionary.add( 'swap', proc { |stack, dictionary| Rpl::Lang::Core.swap( stack, dictionary ) } )

View file

@ -47,9 +47,16 @@ module Rpl
[stack, args]
end
def __todo( stack, _dictionary )
def __todo( stack, dictionary )
puts '__NOT IMPLEMENTED__'
stack
[stack, dictionary]
end
def __pp_stack( stack, dictionary )
pp stack
[stack, dictionary]
end
end
end