P6C::IMCC::prefix - Prefix operators (i.e.
functions and control structures)
- prefix_if
- if/elsif/elsunless/else sequence
- prefix_while
- while() expression
- gen_sub_call
- Do a subroutine call.
- Arguments: $x : a P6C::prefix representing the function call %options : the only valid option currently is 'is_rule'
- XXX: currently ignores context.
We don't have a way of communicating context to functions anyways,
so this isn't a problem.
- FIXME: this also heavily uses the P6C::IMCC::Sub object pulled out of %P6C::IMCC::funcs.
Which would be good to eliminate wherever possible.
- find_named_param
- Look up a named parameter by name in a signature,
and return the P6C::sigparam object if found.
This only looks at named parameters,
not positional params.
- find_positional_param_by_name
- Look up a positional parameter by name in a signature,
and return the P6C::sigparam object if found.
This only looks at positional parameters,
not named parameters.
(Remember,
positional params also have names.)
- categorize_args
- Split up an array of args into positional params,
named params whose names are statically known,
named parameters whose names are unknown at compile time,
etc.
- prefix_for
- for() statement
- prefix_neg
- unary minus
- prefix_pos
- unary plus
- prefix_bitxor
- unary bitwise negation
- val_noarg
- XXX: pretend that the block has a no-argument prototype,
since otherwise it will complain.
This is the wrong behavior for the topicalizing control structures,
but we don't support them yet,
anyways.
- val_topical
- ???
- prefix_foreach
- foreach() statement
- wrap_with_catch
- I assume this does something like what it says it does.
- prefix_try
- Run something in a try { } block.
Implementation just calls wrap_with_catch() with no catch block.
- prefix_return
- Return a value.
- prefix_when
- Handle a case in a given/when clause.
- prefix_default
- Default case in a given{} block.
- prefix_given
- The all-magical given/when construct.
- prefix_defined
- Test whether something is defined.