libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
Public Types | Data Fields
ps_expr Struct Reference

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_typetype
 

Detailed Description

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.

Definition at line 187 of file ast.h.

Member Enumeration Documentation

◆ ps_expr_type

Definition at line 188 of file ast.h.

Field Documentation

◆ bin_expr

struct ps_expr_binary ps_expr::bin_expr

Definition at line 196 of file ast.h.

◆ call_expr

struct ps_expr_call ps_expr::call_expr

Definition at line 198 of file ast.h.

◆ expr_type

enum ps_expr::ps_expr_type ps_expr::expr_type

◆ id_expr

struct ps_expr_id ps_expr::id_expr

Definition at line 194 of file ast.h.

◆ lit_expr

struct ps_expr_lit ps_expr::lit_expr

Definition at line 195 of file ast.h.

◆ type

struct ps_type* ps_expr::type

Definition at line 200 of file ast.h.

◆ un_expr

struct ps_expr_unary ps_expr::un_expr

Definition at line 197 of file ast.h.

◆ [union]

union { ... } ps_expr::value

The documentation for this struct was generated from the following file: