diff options
Diffstat (limited to 'prism/parser.h')
-rw-r--r-- | prism/parser.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/prism/parser.h b/prism/parser.h index 6ee215c76d..5079c59c5f 100644 --- a/prism/parser.h +++ b/prism/parser.h @@ -470,6 +470,19 @@ typedef struct pm_scope { bool explicit_params; /** + * Booleans indicating whether the parameters for this scope have declared + * forwarding parameters. + * + * For example, some combinations of: + * def foo(*); end + * def foo(**); end + * def foo(&); end + * def foo(...); end + */ + + uint8_t forwarding_params; + + /** * An integer indicating the number of numbered parameters on this scope. * This is necessary to determine if child blocks are allowed to use * numbered parameters, and to pass information to consumers of the AST @@ -478,6 +491,11 @@ typedef struct pm_scope { uint8_t numbered_parameters; } pm_scope_t; +static const uint8_t PM_FORWARDING_POSITIONALS = 0x1; +static const uint8_t PM_FORWARDING_KEYWORDS = 0x2; +static const uint8_t PM_FORWARDING_BLOCK = 0x4; +static const uint8_t PM_FORWARDING_ALL = 0x8; + /** * This struct represents the overall parser. It contains a reference to the * source file, as well as pointers that indicate where in the source it's |