optimize eval and fix it for :list
This commit is contained in:
parent
f4fa29da5c
commit
0ad027a6b6
1 changed files with 5 additions and 1 deletions
|
@ -12,7 +12,11 @@ module RplLang
|
||||||
proc do
|
proc do
|
||||||
args = stack_extract( [:any] )
|
args = stack_extract( [:any] )
|
||||||
|
|
||||||
run( args[0][:value].to_s )
|
if %i[list string numeric boolean].include?( args[0][:type] )
|
||||||
|
@stack << args[0] # these types evaluate to themselves
|
||||||
|
else
|
||||||
|
run( args[0][:value].to_s )
|
||||||
|
end
|
||||||
end )
|
end )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue