Zen-C
Loading...
Searching...
No Matches
codegen_stmt.c File Reference
#include "codegen.h"
#include "zprep.h"
#include "../constants.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../plugins/plugin_manager.h"
#include "ast.h"
#include "zprep_plugin.h"
Include dependency graph for codegen_stmt.c:

Macros

#define EMIT_ATTR(cond, name)
 

Functions

void codegen_match_internal (ParserContext *ctx, ASTNode *node, FILE *out, int use_result)
 Internal handler for match statements.
 
void codegen_node_single (ParserContext *ctx, ASTNode *node, FILE *out)
 Generates code for a single AST node (non-recursive for siblings).
 
void codegen_walker (ParserContext *ctx, ASTNode *node, FILE *out)
 Walker for list of nodes (calls codegen_node recursively).
 

Variables

char * g_current_func_ret_type = NULL
 Return type of current function.
 

Macro Definition Documentation

◆ EMIT_ATTR

#define EMIT_ATTR (   cond,
  name 
)
Value:
if (cond) \
{ \
if (!first) \
fprintf(out, ", "); \
fprintf(out, name); \
first = 0; \
}
const char *const name
Definition cJSON.h:307

Function Documentation

◆ codegen_match_internal()

void codegen_match_internal ( ParserContext ctx,
ASTNode node,
FILE *  out,
int  use_result 
)

Internal handler for match statements.

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

◆ codegen_node_single()

void codegen_node_single ( ParserContext ctx,
ASTNode node,
FILE *  out 
)

Generates code for a single AST node (non-recursive for siblings).

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

◆ codegen_walker()

void codegen_walker ( ParserContext ctx,
ASTNode node,
FILE *  out 
)

Walker for list of nodes (calls codegen_node recursively).

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

Variable Documentation

◆ g_current_func_ret_type

char* g_current_func_ret_type = NULL

Return type of current function.