parrotcode: Pugs Capture | |
Contents | Language Implementations | Pugs |
pugscapture.pmc - Pugs Capture
PugsCapture
extends Siva
(currently in-lined) to provide a Perl 6 Capture object.
(The following is from the original Siva
PMC by Stephane Payrard)
Siva is a type that acts as a hash, array , string scalar, int scalar. It is intended as the type for nodes of attributed trees These attributed trees may probably be of various kinds such as parse trees and XML trees. The intensive use of context should minimize explicit structure walking at the level of assembly code.
Hashes and arrays are allocated only when needed.
static STRING *make_hash_key(Interp *interp, PMC *key)
*key
.static PMC *undef(Interp *interp)
PerlUndef
PMC.static PMC *retval(Interp *interp, void *ret)
*ret
,
returning the appropriate PMC,
or raising an exception if necessary.static PMC *Parrot_Array_set_pmc_ptr(Interp *interp, List *list, INTVAL key)
key
of *list
.
If this element was previously empty,
then this function also creates and assigns an "undef" PMC (currently a PerlUndef
,
but this may change) to that element.
|