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

Functions

int check_program (ParserContext *ctx, ASTNode *root)
 Main Type Checking Entry Point.
 

Function Documentation

◆ check_program()

int check_program ( ParserContext ctx,
ASTNode root 
)

Main Type Checking Entry Point.

Performs semantic analysis on the entire AST.

Parameters
ctxGlobal parser context.
rootRoot AST node of the program.
Returns
0 on success (no errors), non-zero if errors occurred.