generator: Create a separate type for optional arguments
Previously, optional arguments had the same type as regular arguments, but were
constrained by various runtime tests to be only Bool, Int, Int64 or String. This
change makes the type of optional arguments stronger by giving them their own
type.
A convenience function, optargs_to_args is defined to convert optargs in the few
places where they are genuinely treated identically to mandatory arguments.
It also allows for future changes to optional arguments which do not affect
mandatory arguments.
RWMJ:
- removed redundant parens
- readded the check for > 64 optargs, but changed it to > 63
- changed the new function to args_of_optargs
17 files changed: