Cthulhu  0.2.10
Cthulhu compiler collection
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ast.c File Reference
#include "json_ast.h"
#include "json_scan.h"
#include "base/panic.h"
#include "notify/notify.h"
#include "std/map.h"
#include "std/typed/vector.h"
#include "json/json.inc"
Include dependency graph for ast.c:

Go to the source code of this file.

Macros

#define JSON_TYPE(id, str)   [id] = (str),
 

Functions

const char * json_kind_name (json_kind_t kind)
 get the name of a json kind More...
 
json_member_t json_member (text_view_t key, json_t value)
 
json_t json_ast_string (where_t where, text_view_t string)
 
json_t json_ast_integer (where_t where, mpz_t integer)
 
json_t json_ast_float (where_t where, float real)
 
json_t json_ast_boolean (where_t where, bool boolean)
 
json_t json_ast_array (where_t where, typevec_t array)
 
json_t json_ast_object (scan_t *scan, where_t where, const typevec_t *members)
 
json_t json_ast_empty_object (where_t where)
 
json_t json_ast_null (where_t where)
 

Macro Definition Documentation

◆ JSON_TYPE

#define JSON_TYPE (   id,
  str 
)    [id] = (str),

Function Documentation

◆ json_ast_array()

json_t json_ast_array ( where_t  where,
typevec_t  array 
)

Definition at line 70 of file ast.c.

◆ json_ast_boolean()

json_t json_ast_boolean ( where_t  where,
bool  boolean 
)

Definition at line 63 of file ast.c.

◆ json_ast_empty_object()

json_t json_ast_empty_object ( where_t  where)

Definition at line 105 of file ast.c.

◆ json_ast_float()

json_t json_ast_float ( where_t  where,
float  real 
)

Definition at line 56 of file ast.c.

◆ json_ast_integer()

json_t json_ast_integer ( where_t  where,
mpz_t  integer 
)

Definition at line 49 of file ast.c.

◆ json_ast_null()

json_t json_ast_null ( where_t  where)

Definition at line 112 of file ast.c.

◆ json_ast_object()

json_t json_ast_object ( scan_t scan,
where_t  where,
const typevec_t members 
)

Definition at line 77 of file ast.c.

◆ json_ast_string()

json_t json_ast_string ( where_t  where,
text_view_t  string 
)

Definition at line 42 of file ast.c.

◆ json_member()

json_member_t json_member ( text_view_t  key,
json_t  value 
)

Definition at line 32 of file ast.c.