additionally, unnamed complex-msg args no longer need to be prefixed
with a colon. this allows complex-msgs to more closely emulate
traditional function calls. this also applies to the call-operator.
for example, take the following lambda:
var f = [ :x :y | ^x * 2 + y ].
before, this lambda would be invoked using the following syntax:
f(:2 :4).
now, this syntax is used instead:
f(2, 4).
some source files are recognised as objc source files due to the use
of array initialiser macros. because of this, the C/C++ formatting settings
defined in .clang-format weren't being used.
now, the correct settings are applied for objc files too.
the codegen scope system has been removed. instead, each generator state in the stack,
from the current state backwards, is informed when a variable is defined, resolved, or
captured.
when a variable is defined, the state stack is traversed back-to-front (current generator
first). each state has a chance to record the variable definition. once one state has
signalled that it has recorded the variable definition, the traversal ends.
when a variable is resolved, the state stack is traversed back-to-front (current generator
first). each state is asked whether or not it recognises the variable identifier being resolved.
if a state has the variable in question defined, it returns information about the variable
definition, and the traversal stops.
once a variable has been resolved, the state stack is traversed front-to-back (current generator
last), starting from the generator /after/ the one that provided the variable definition. each
generator in the iteration is given the chance to adjust the variable information, or generate
IR in response to the variable being accessed. this is used to implement variable capture,
where the state of a variable in the enclosing context is captured for later use.
func args are added manually using mie_func_add_arg, while the func's name
is specified when the func is added to a module, to allow the module to generate
a unique name.
previously, an expression like:
x arg1:a arg2:(c subArg:d).
were being parsed incorrectly. This expression was parsed
as single -arg1:arg2:subArg: message being sent to x. the
parentheses around the `c subArg:d` sub-expression were
being ignored.
now, this expression is correcly parsed as the value
of `c subArg:d` being passed as a parameter to the message
-arg1:arg2:
the var keyword allows greater control over what scope a
particular variable exists in. it clarifies whether a new
variable is being defined or an existing variable is being
assigned to. it will also facilitate the implementation of
global variables.
the caller can now provide a pointer arg to ivy_ast_node_iterate, which will
be forwarded to the specified callback function each time it is called.
the iterator now behaves similarly to fts, in that it visits each node
in both pre-order and post-order, and indicates to the callback whether
the current iteration is pre- or post-order.