added a new method directive #liberal to indicate a method that accept a fully variadic number of arguments.

the directive #liberal allows the caller to omit the named arguments as well.
the directive #variadic requires the caller to provide at least the named arguments
This commit is contained in:
hyunghwan.chung
2017-04-01 06:54:27 +00:00
parent aeb02213b4
commit 2ed62a5edb
4 changed files with 41 additions and 19 deletions

View File

@ -596,6 +596,7 @@ struct moo_method_t
/* preamble flags */
#define MOO_METHOD_PREAMBLE_FLAG_VARIADIC (1 << 0)
#define MOO_METHOD_PREAMBLE_FLAG_LIBERAL (1 << 1)
/* NOTE: if you change the number of instance variables for moo_context_t,
* you need to change the defintion of BlockContext and MethodContext.