Open rebcabin opened 1 year ago
Here is a definition of IntrinsicFunction:
| IntrinsicFunction(int intrinsic_id, expr* args, int overload_id,
ttype? type, expr? value)
The arguments are just a list of expressions. They cannot be optional, so there is no double nesting. Everything seems clean? There is no call-arg
or call-args
for IntrinsicFunction.
The question is "why is it different to FunctionCall
and SubroutineCall
? I can handle the difference, just want to know why ... expr *
may be too loose, not sure yet.
We designed IntrinsicFunction to be more strict. No need to check for "nil", since it can't be nil.
I've had
call-args
as a vector of lists working withSubroutineCall
andFunctionCall
for a while (see Issue #32) . Here is the spec and an example lifted from thelpython
.stdout
reference outputs:However, I encountered the following usage in
expr_14-6023c49
:This has one too few levels of nesting for a
call-args
. I solved it with a spec like this:I guess this is OK, but it's a little "hinky."