Zen-C
Loading...
Searching...
No Matches
ast.c File Reference
#include "ast.h"
#include "../parser/parser.h"
#include "zprep.h"
#include <stdlib.h>
#include <string.h>
Include dependency graph for ast.c:

Data Structures

struct  TraitReg
 

Typedefs

typedef struct TraitReg TraitReg
 

Functions

void register_trait (const char *name)
 Register a trait.
 
int is_trait (const char *name)
 Check if a name is a trait.
 
ASTNodeast_create (NodeType type)
 
void ast_free (ASTNode *node)
 
Typetype_new (TypeKind kind)
 
Typetype_new_ptr (Type *inner)
 
int is_char_ptr (Type *t)
 
int is_integer_type (Type *t)
 
int is_float_type (Type *t)
 
int type_eq (Type *a, Type *b)
 
char * type_to_string (Type *t)
 
char * type_to_c_string (Type *t)
 

Typedef Documentation

◆ TraitReg

typedef struct TraitReg TraitReg

Function Documentation

◆ ast_create()

ASTNode * ast_create ( NodeType  type)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ast_free()

void ast_free ( ASTNode node)

◆ is_char_ptr()

int is_char_ptr ( Type t)
Here is the caller graph for this function:

◆ is_float_type()

int is_float_type ( Type t)
Here is the caller graph for this function:

◆ is_integer_type()

int is_integer_type ( Type t)
Here is the caller graph for this function:

◆ is_trait()

int is_trait ( const char *  name)

Check if a name is a trait.

Here is the caller graph for this function:

◆ register_trait()

void register_trait ( const char *  name)

Register a trait.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ type_eq()

int type_eq ( Type a,
Type b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ type_new()

Type * type_new ( TypeKind  kind)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ type_new_ptr()

Type * type_new_ptr ( Type inner)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ type_to_c_string()

char * type_to_c_string ( Type t)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ type_to_string()

char * type_to_string ( Type t)
Here is the call graph for this function:
Here is the caller graph for this function: