Add comment clarifying presence of empty eval function

This commit is contained in:
Mahmoud Al-Qudsi 2019-04-11 12:57:14 -05:00
parent b82fa187ea
commit 0cf0829c5f

View file

@ -1,3 +1,12 @@
function eval
# This empty function is required as while `eval` is implemented internally as
# a decorator, unlike other decorators such as `command` or `builtin`, it is
# *not* stripped from the statement by the parser before execution to internal
# quirks in how statements are handled; the presence of this function allows
# constructs such as command substitution to be used in the head of an
# evaluated statement.
#
# The function defined below is only executed if a bare `eval` is executed (with
# no arguments), in all other cases it is bypassed entirely.
function eval
end