parrotcode: AST node handling | |
Contents | Compilers |
compilers/ast/node.c - AST node handling
The AST (Abstract Syntax Tree) represents the code of a HLL source module.
int IMCC_find_node_nr(const char *name)
ast_list
of the given node name or 0 if the node name doesn't exist.nodeType *IMCC_new_const_node(Interp*, char *name, int set, YYLTYPE *loc)
name
and Parrot register set set
.
Set may be: 'I' ... Integer
'N' ... Number
'S' ... String
'U' ... String treated as unicode string
'P' ... PMCs (PMC constants aren't finished)
'o' ... opcode name
nodeType *IMCC_new_var_node(Interp*, char *name, int set, YYLTYPE *loc)
nodeType *IMCC_new_temp_node(Interp*, int set, YYLTYPE *loc)
nodeType *IMCC_new_node(Interp*, int nr, nodeType *child, YYLTYPE *loc)
nr
and the given child.nodeType *IMCC_append_node(Interp *, nodeType *a, nodeType *b, YYLTYPE *loc)
b
add the end of a
and return a
.IMCC_dump_nodes(nodeType *p)
stdout
void IMCC_expand_nodes(Interp *interpreter, nodeType *p)
void IMCC_free_nodes(Interp *interpreter, nodeType *p)
*/
/* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */
|