3 * Copyright (C) 2007, The Perl Foundation.
5 #ifndef PARROT_PIR_MACRO_H_GUARD
6 #define PARROT_PIR_MACRO_H_GUARD
16 typedef struct macro_def
{
22 struct macro_def
*next
;
27 /* A constant table represents a "scope" for macro and constants.
28 * All .macro_const and .macro definitions are stored in the "global"
29 * table, but when expanding a macro, the parameter values are stored
30 * in a "local" table, which is "pushed" onto a conceptual stack.
31 * This conceptual stack is implemented by linking the tables together.
32 * When searching in a table, the table elements are search first, and
33 * when the element is not found, the element is looked for in the
34 * table pointed to by the "prev" field.
36 typedef struct constant_table
{
37 macro_def
*definitions
;
38 /* constant tables are linked through this pointer,
39 * and organized as a stack. If a constant is not found
40 * in this table, then the previous table is tried, and so on,
41 * while there is a previous table.
43 struct constant_table
*prev
;
48 #endif /* PARROT_PIR_MACRO_H_GUARD */
52 * c-file-style: "parrot"
54 * vim: expandtab shiftwidth=4: