|
libpulsar
A modular compiler for the pulsar programming language
|
Expression nodes are represented with tagged unions. More...
#include <ast.h>
Public Types | |
| enum | ps_expr_type |
Data Fields | ||
| enum ps_expr::ps_expr_type | expr_type | |
| union { | ||
| struct ps_expr_id id_expr | ||
| struct ps_expr_lit lit_expr | ||
| struct ps_expr_binary bin_expr | ||
| struct ps_expr_unary un_expr | ||
| struct ps_expr_call call_expr | ||
| } | value | |
| struct ps_type * | type | |
Expression nodes are represented with tagged unions.
Use expr_type to determine the tag and select the appropriate value. Type analysis will assign to type, so construct as NULL.
| struct ps_expr_binary ps_expr::bin_expr |
| struct ps_expr_call ps_expr::call_expr |
| enum ps_expr::ps_expr_type ps_expr::expr_type |
| struct ps_expr_id ps_expr::id_expr |
| struct ps_expr_lit ps_expr::lit_expr |
| struct ps_expr_unary ps_expr::un_expr |
| union { ... } ps_expr::value |