correct help strings of repl words

This commit is contained in:
Gwenhael Le Moine 2022-10-05 09:55:46 +02:00
parent 06e43ca137
commit 423753feb4
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -14,7 +14,7 @@ module RplLang
@dictionary.add_word( ['words'], @dictionary.add_word( ['words'],
category, category,
'DEBUG', '() print the categorized list of all words',
proc do proc do
@dictionary.words @dictionary.words
.to_a .to_a
@ -27,12 +27,12 @@ module RplLang
@dictionary.add_word( ['history'], @dictionary.add_word( ['history'],
category, category,
'', '() print the REPL\'s history',
proc {} ) proc {} )
@dictionary.add_word( ['edit'], @dictionary.add_word( ['edit'],
category, category,
'( -- s ) Pop the interpreter\'s complete indentification string', '( x -- y ) open object in $EDITOR',
proc do proc do
args = stack_extract( [:any] ) args = stack_extract( [:any] )
@ -54,24 +54,25 @@ module RplLang
@stack << Types.new_object( args[0].class, edited_value ) @stack << Types.new_object( args[0].class, edited_value )
end ) end )
category = 'DEBUG'
@dictionary.add_word( ['.s'], @dictionary.add_word( ['.s'],
category, category,
'DEBUG', '() print internal state of stack',
proc { pp @stack } ) proc { pp @stack } )
@dictionary.add_word( ['.d'], @dictionary.add_word( ['.d'],
category, category,
'DEBUG', '() print internal state of dictionary',
proc { pp @dictionary } ) proc { pp @dictionary } )
@dictionary.add_word( ['.v'], @dictionary.add_word( ['.v'],
category, category,
'DEBUG', '() print internal state of variables',
proc { pp @dictionary.vars } ) proc { pp @dictionary.vars } )
@dictionary.add_word( ['.lv'], @dictionary.add_word( ['.lv'],
category, category,
'DEBUG', '() print internal state of local variables layers',
proc { pp @dictionary.local_vars_layers } ) proc { pp @dictionary.local_vars_layers } )
end end
end end